From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.diffs,gmane.emacs.devel Subject: Re: master 9227864: Further fix for aborts due to GC losing pseudovectors Date: Tue, 26 May 2020 07:25:01 +0000 Message-ID: References: <20200526060645.22243.34109@vcs0.savannah.gnu.org> <20200526060646.662E120A2C@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000089272305a6880029" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52231"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-diffs@gnu.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-diffs-bounces+gnu-emacs-diffs=m.gmane-mx.org@gnu.org Tue May 26 09:25:45 2020 Return-path: Envelope-to: gnu-emacs-diffs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdTy5-000DVl-0s for gnu-emacs-diffs@m.gmane-mx.org; Tue, 26 May 2020 09:25:45 +0200 Original-Received: from localhost ([::1]:45726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdTy4-0005nL-0e for gnu-emacs-diffs@m.gmane-mx.org; Tue, 26 May 2020 03:25:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdTy1-0005l4-My; Tue, 26 May 2020 03:25:41 -0400 Original-Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]:46896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdTy0-0005fZ-7I; Tue, 26 May 2020 03:25:41 -0400 Original-Received: by mail-oo1-xc33.google.com with SMTP id g22so4023670oop.13; Tue, 26 May 2020 00:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zRojL16O7zb1vIG9+uVQPXqu5RXakhWuSZ+D9rfdlJk=; b=HTneMRIaXiZr5XmHfQelvU/pWMz4xqZBgopTpFdyvpdYA6Q35jucG3fZPUAhv69IMQ yEs1tCQl6XRNji77uS+UBRP1gV+MiASg+a60eiu5FWoKizr87fc2dgmiakAGRmaoDHBN Nh33vG0HEQpd+habuc4kfHuU7aNcPHYlNeDGJseh6IPmIJKbY/e1MIdxjqrnFmCB+A6c GsUliPdq39+RSN4f/XZq31qx6V0RPultmwWlXmRbsB3TFlnmuKQr8aIFtq3+gHIFCq08 xdhlQazamWyTIHi1bXs/hRr6kjg+qKFnRR55v/GqT6AxHiMJxmDTZ6HG+ZbBsEbBqp6o Fl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zRojL16O7zb1vIG9+uVQPXqu5RXakhWuSZ+D9rfdlJk=; b=uYhDdUUygs1DMv73tem6Z1RGKMQzUuYJu3kjRrByWgf4EdilA6UbHjsSpdk7rrjQqx NpHYYkINSL2wRelo/xVh6/p2AykLr7EV8BU5n6SiWRAT/Drtga9FyS5vPXiO3PFreezb X9F3qHcIMuWeOpVlOnT3WBiEBBDFDr9LFoEhDS7vPLrwi5r7RMhm5gvhgJgHrhg6ANrQ ioAjF46zCbgay5qPBl4tksgI9Hrqrip7VPcSyspfBKvNaMJoCUDjEyGG2WrijculwB8I N4O2loawwTJpesnJYmvDFhmVKaAzxIne+17+eI+PKYXpPh1LsUr4Tg47KVh6cVTiZujq Y8Og== X-Gm-Message-State: AOAM532SGS9cWU3DxKAqgnWYJyXS1cD8Sk37h7zPHz5yBJ2W1LgNLs8p QMbE/2zVzFhmomyRbggAjT0lTRu5wKaSDzJYoZY= X-Google-Smtp-Source: ABdhPJy0acKdN0N1S4NUuUFtyI+qTUA39S19MI1J7pF4tlQFOchAwx42lK78NkXTUsB5lQI8kGBaIQJ+9W1Inji2AyA= X-Received: by 2002:a4a:9704:: with SMTP id u4mr15744653ooi.88.1590477938297; Tue, 26 May 2020 00:25:38 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::c33; envelope-from=pipcet@gmail.com; helo=mail-oo1-xc33.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-diffs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for Emacs changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-diffs-bounces+gnu-emacs-diffs=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-diffs" Xref: news.gmane.io gmane.emacs.diffs:156310 gmane.emacs.devel:251434 Archived-At: --00000000000089272305a6880029 Content-Type: text/plain; charset="UTF-8" On Tue, May 26, 2020 at 7:09 AM Paul Eggert wrote: > On 5/25/20 11:40 PM, Pip Cet wrote: > > > It makes the code much more > > complicated, all for hypothetical systems that require alignment > 8 > > for a hypothetical 16-byte data type in a Lisp structure. > > It's true that we haven't run into these systems yet. However, I worry that it > won't be all that hypothetical in the not-so-distant future, given that so many > SIMD instructions require multiple-of-16 alignment and Emacs pseudovectors use > system types that may require such alignment. (I believe some AVX instructions require multiple-of-32 alignment.) > > I think we should be specific here and say it's the mingw.org 32-bit > > version (or whatever Eli's using) only that has problems. > > It can also happen with GCC 7 + glibc 2.25. Some platforms are fitfully moving > to alignment-of-16 malloc and there are mismatches between system pieces. I'm > not sure we can catalog all the affected systems. Then we shouldn't mention any system at all. > >> - generate better code. > >> + generate better code. Also, such structs should be added to the > >> + emacs_align_type union. > > > > That's going to be a maintenance nightmare, since failures to do so > > won't actually show up on real machines, and a lot of wasted memory if > > someone does add an AVX512 type. > > In current master I've fixed this so that there is zero wasted memory; the type > is used only to calculate alignment, not to allocate memory. roundup_size still uses LISP_ALIGNMENT here, so I don't see how that's true. I'll look again. > > I'd prefer a simple warning not to use long double or similarly > > unusual types in pseudovectors, and an eassert (see below) to catch it > > if people do that. > > That's not going to work if some platform uses an alignment-of-16 type in > pthread_cond_t (or some other system type that Emacs uses). Well, realistically, if pthread_cond_t is going to require greater alignment, it's probably going to require alignment to a cache line: 64 bytes or more. We don't want that to silently work (wasting as much memory as it would), we want it to generate an assertion error so we know to move the pthread_cond_t to a malloc'd area. > > I think a simple eassert (GCALIGNMENT % alignof (type) == 0) in an > > (inlined, obviously) version of allocate_pseudovector should suffice > > to catch this hypothetical problem. > > I assume you meant 'verify' rather than 'eassert'? That'd catch the bug at > compile time. I don't see how that would be possible using inline functions? > But instead, how about an alignment argument to allocate_pseudovector, or a > variant of allocate_pseudovector that takes such an argument? Then Emacs could > support any alignment-greater-than-16 types that turn up. Precisely. But until then, let's leave it as an eassert. Here's the patch I was going to propose before you wrote. Maybe there should be a variant of eassert that generates a compile-time error if its argument is a compile-time constant that evaluates to 0? Something like "eassert_reachable", maybe? --00000000000089272305a6880029 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-GCALIGNMENT.patch" Content-Disposition: attachment; filename="0001-Fix-GCALIGNMENT.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kanlfwem0 ZGlmZiAtLWdpd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