From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70937C433FE for ; Fri, 30 Sep 2022 10:45:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9F0886B0072; Fri, 30 Sep 2022 06:45:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 99FE06B0074; Fri, 30 Sep 2022 06:45:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 867A18D0001; Fri, 30 Sep 2022 06:45:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 773BE6B0072 for ; Fri, 30 Sep 2022 06:45:18 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 3F8DD1A0B4E for ; Fri, 30 Sep 2022 10:45:18 +0000 (UTC) X-FDA: 79968419916.18.6678D1C Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by imf16.hostedemail.com (Postfix) with ESMTP id E1ED7180010 for ; Fri, 30 Sep 2022 10:45:17 +0000 (UTC) Received: by mail-oi1-f181.google.com with SMTP id g130so4293803oia.13 for ; Fri, 30 Sep 2022 03:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date; bh=rp+AUzw48kPjNoG0TObMsKe52xjTIWv93LqcpRlYlJM=; b=KncvJt3XyKHWuEPGMYajxDFRmbhE3pvdWWOcetyR3KDtNpCt4uS3iGTl+qUOFe5c5v AWJFrxzbnStIEaBDZKAnNpt40NftazR0unQZI5WQlQD7U3Nj/p628I9NfJSWOzcjj4ry XsUj8XSxEGPilzwUNuqfit2216tZktBXNA8uruw+Y7z+OIaFEKMEgDeSnG6ITEG64WmL U7hpuTnVOFn/h4eQyysugmbyDVbmsE0D5l8QcmPihpEHLO7Gn7WYXcZ1jSkd+3+779qx AQ2Z9rlyNGui0NxKHmI2NhgRd2n1BeMGC+MZPG4Um6HVx+jVc51dZcVIjR8YzOSSQOyu Y19Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date; bh=rp+AUzw48kPjNoG0TObMsKe52xjTIWv93LqcpRlYlJM=; b=CYR20SmPO2SMyKmrnhOidR2ScEHX53uim2B25aem2q3E2KFzqoB8lBeJhQCyh982k1 yj8VB/fdvFn6qEN6lmbkkBh/6EoRkp6r4q7+NILSH2H1RQKUyDfjb7gOV9HN8BkvDF5w e0DxOWk66fv8ZhS57LufhznjP/S/KS510vCkQz7gMU1BF0tCBR4tj0yMcEai7kHY3xvW CA0QBdtjP1BonH/Y8EiHWgCx4EeWHos8Ba4J+7KRgJfMqUW7+EiBX9Whly5JU6CJXz9V iWFYy14JU238uF8boaMPbN7lSBPZ5jhWNpjLsMc4aKVgRnugDmhtcnACvCLndt1YX3p7 qung== X-Gm-Message-State: ACrzQf3c3rYPYMQAyOA0B0EkuDNzaUVZyAkaCJsQqTVCRCW4oATpYLjL J1CLRWulV6R3uvkh0D59nBgbVA== X-Google-Smtp-Source: AMsMyM4xAVJT+qKKj0t+3/lVyFvt474wQzC+bc4sFjbEL4Cy7lPhvKLnep2tqBYkRTFhPEP5+khWaQ== X-Received: by 2002:a05:6808:1285:b0:350:9908:6394 with SMTP id a5-20020a056808128500b0035099086394mr9307788oiw.150.1664534716913; Fri, 30 Sep 2022 03:45:16 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id a9-20020a0568300b8900b00655bbb53c55sm512687otv.15.2022.09.30.03.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 03:45:16 -0700 (PDT) Date: Fri, 30 Sep 2022 03:45:04 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Vlastimil Babka cc: Hugh Dickins , David Laight , Joel Fernandes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Matthew Wilcox , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE In-Reply-To: Message-ID: <16fe443a-dabe-aa46-6bc7-dad03f29e0dc@google.com> References: <35502bdd-1a78-dea1-6ac3-6ff1bcc073fa@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=KncvJt3X; spf=pass (imf16.hostedemail.com: domain of hughd@google.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664534717; a=rsa-sha256; cv=none; b=RegZW9gVMyWZzebpNQpjCE4aE4VYCjD1BDOqhMiMlHvxs7+MtruyHbITzTiL8p+SxGpzkz 0wZgGcNj5IMl6jI0UH40DSwo/YCeEskq5RqrGds5HHn1Hfp4SOZmHFjm+nmaew6caTaeda Gg+tCeitHYhAzrpnJhRufgmzO5k6wbI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664534717; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rp+AUzw48kPjNoG0TObMsKe52xjTIWv93LqcpRlYlJM=; b=7dhE6FL3k3MkeDUZ/mf2BgzWf0fNqPMMpS2xLFYV7E0T+kYYuWsTz5A1FXl45w8SdQVYm7 r2NYSHILFWpcKuDEbBslaafjugBVtbKoAy2k52TZlvkHlQ/zneIprHZVzTv8DIlPT1pnS2 2E5PAdj4NynqDx95wbrDb1Y0Jim/+Kg= Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=KncvJt3X; spf=pass (imf16.hostedemail.com: domain of hughd@google.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Stat-Signature: k48c5ofh133s5cyeea1sumuhcnekhkoe X-Rspamd-Queue-Id: E1ED7180010 X-Rspamd-Server: rspam05 X-HE-Tag: 1664534717-178237 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 30 Sep 2022, Vlastimil Babka wrote: > On 9/29/22 23:54, Hugh Dickins wrote: > > On Thu, 29 Sep 2022, Vlastimil Babka wrote: > >> > >> Thanks a lot Hugh! That's a sufficiently small fix (compared to the other > >> options) that I'm probably give it one last try. > > > > I suddenly worried that you might be waiting on me for a Signed-off-by, > > which I couldn't give until I researched my reservations (a) and (b): > > but I'm pleased to see from your kernel.org tree that you've gone ahead > > and folded it in - thanks. > > Yeah could have been more explicit about that, sorry. But made the whole > thing a very last merge so I can still drop it before the pull request. No probs, you did the right thing. > > > Regarding (a): great, you've found it too, mm/slab.c's kmem_rcu_free() > > looks like it needs the same __aligned(4) as mm/slub.c's rcu_free_slabi(). > > Right. > > > Regarding (b): I booted the PowerMac G5 to take a look, and dredged up > > the relevant phrase "function descriptor" from depths of my memory: I > > was right to consider that case, but it's not a worry - the first field > > of a function descriptor structure (on all the architectures I found it) > > is the function address, so the function descriptor address would be > > aligned 4 or 8 anyway. > > Thanks. I admit I wasn't that thorough, just consulted somebody internally :) Exactly what I had hoped you would do. > > > Regarding "conflicting" alignment requests: yes, I agree with you, > > it would have to be a toolchain bug if when asked to align 2 and to > > align 4, it chose not to align 4. > > Yeah. But I still would be less worried if another __aligned(X) function > existed in the tree already. Found only data. I assume the i915 thing wasn't > fixed like this in the tree? So if there are buggy toolchains or anything, > it will be us to discover them. Linus put it in himself, after it had got lost over several -rcs: 5.15's cdc1e6e225e3 ("drm/i915: fix blank screen booting crashes"). Originally I'd written "__aligned(4)" explicitly, but later found i915 relied on it elsewhere since 4.9, and had an __i915_sw_fence_call for it. But 5.17's 44505168d743 ("drm/i915: Drop stealing of bits from i915_sw_fence function pointer") appears to have removed all that now. I think that gives assurance that the x86 toolchains are okay; but I imagine i915 is unlikely to be found on other architectures, so not quite so much assurance there. Hugh