Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2088270rwb; Thu, 29 Sep 2022 06:10:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM58kCHOFK/ruyepFhpgUaUUpLFg+Cfkv5CGhdDIsnR5kfhLqFUXSjh2hMBe0zkxNlhwA+ek X-Received: by 2002:a17:907:7f05:b0:781:e579:46b5 with SMTP id qf5-20020a1709077f0500b00781e57946b5mr2730466ejc.102.1664457044645; Thu, 29 Sep 2022 06:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664457044; cv=none; d=google.com; s=arc-20160816; b=pc2nTCqRPMBn877cxhxfDkdR/ugynIRjNMpqZm4skGk+6ehZM0AZdWujAq/7CDxmn8 06ZFnMkdVZpoJ+r4E0AJC6HS9CKD4H9vqbMyDbTrECGGiInDblmxOvGYvOpNgqUKb25K YTxn8Ae+nKN30r5XgeJpRvCz64bTMia8/umkgYfXmBOWXHicPgGQ26mir3a+iPJa4zOh 3F+uUj9gtVYW3FHv9DTisB+kudU542wvZos3SSKQUHq/U53+ak8NtsBugLsUboCPvllD ltJ6lnVWiRaUHhZF4K8avsT7H3OYpmn/lyMnP68YFhou6XAN0Oh967Ar9xbGfM9JNMA5 zHnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=mMcf2TQeX0/eb4xhoq81siCbWjBexQIYrNessvTrls0=; b=0uqu6osH4tCqP9P4n8rTwTK3Edt/t7RRXXh48cerpAC4Il17ZRGX3zxaYzhvyTfswy mIeHVGcaKkiEUIgLvciguOGNIfDDrIIZ7GZKg+gHA1Tu+osd5//gjc7uo1kHier5yhtN +JKFgUG02ObxjMtKjnNkqhCVvjfrQSrk+c5Nn+y2hl5qhyzUsM/ZjaBJKLFopaBq1qxV b4fePpHg7FYhAP4nyY81QWgoANDku7hri/jYcZlBCkWibs4rWPPkbXAmt7LQwBLk2S8O uPv109oMQw5v6XNXkcj23gaQoXrTzO3hhQhGNq+1jJhC0xFqCk+gmqfvWfGIEBcPUi/8 HTmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=faj4fGdF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a1709066acb00b00783a9ea7065si6241026ejs.135.2022.09.29.06.10.18; Thu, 29 Sep 2022 06:10:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=faj4fGdF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235518AbiI2NBU (ORCPT + 99 others); Thu, 29 Sep 2022 09:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbiI2NBO (ORCPT ); Thu, 29 Sep 2022 09:01:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 308A1145CB2 for ; Thu, 29 Sep 2022 06:01:10 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CD6A721989; Thu, 29 Sep 2022 13:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664456468; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mMcf2TQeX0/eb4xhoq81siCbWjBexQIYrNessvTrls0=; b=faj4fGdFpfGVhaEqpGzULjNu1kQQ2G+CCGyj+FN+xBuMcjw4qsjF7mZyoxkF57ZcOCe/MF JUQs/JLc7t4A655bltpgqRsXKAiCvFJ0us9oVRfrTcVa8WWo7tIu5rZiUhqvSGZ22hlD/2 fLz1ET6mwR26bwoEhis9ZaYHvRrr28c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664456468; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mMcf2TQeX0/eb4xhoq81siCbWjBexQIYrNessvTrls0=; b=mUmxr83wtjjOp5fo3R1ql2+h/veH208ewoxPaK1KjCvEgGDjxwEsH7sx4hvZQMNsYtF5t+ kFld784OrpJOGqCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A9E321348E; Thu, 29 Sep 2022 13:01:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eyDSKBSXNWNhGgAAMHmgww (envelope-from ); Thu, 29 Sep 2022 13:01:08 +0000 Message-ID: Date: Thu, 29 Sep 2022 15:01:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE Content-Language: en-US To: David Laight , 'Hugh Dickins' Cc: Joel Fernandes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Matthew Wilcox , Andrew Morton , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" References: <35502bdd-1a78-dea1-6ac3-6ff1bcc073fa@suse.cz> <9368c760191448bba0e062709cc7c799@AcuMS.aculab.com> From: Vlastimil Babka In-Reply-To: <9368c760191448bba0e062709cc7c799@AcuMS.aculab.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/29/22 13:53, David Laight wrote: >> -static void rcu_free_slab(struct rcu_head *h) >> +/* >> + * rcu_free_slab() must be __aligned(4) because its address is saved >> + * in the rcu_head field, which coincides with page->mapping, which >> + * causes trouble if compaction mistakes it for PAGE_MAPPING_MOVABLE. >> + */ >> +__aligned(4) static void rcu_free_slab(struct rcu_head *h) >> { >> struct slab *slab = container_of(h, struct slab, rcu_head); >> > > Isn't that going to cause grief with options that align > functions on 16/32byte boundaries when adding space for > 'other stuff'? How is that done exactly? Also having higher alignment (16/32) is not in conflict with asking for 4? > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) >