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 CFE2DC433F5 for ; Thu, 29 Sep 2022 13:01:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EBDF38D0002; Thu, 29 Sep 2022 09:01:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E6D208D0001; Thu, 29 Sep 2022 09:01:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D34108D0002; Thu, 29 Sep 2022 09:01:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C3CD78D0001 for ; Thu, 29 Sep 2022 09:01:18 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 31026160AFA for ; Thu, 29 Sep 2022 13:01:18 +0000 (UTC) X-FDA: 79965133836.29.7F29514 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id D909116004C for ; Thu, 29 Sep 2022 13:01:10 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664456471; a=rsa-sha256; cv=none; b=L+J2C9Y7phlB3YlOMkPGC6GuDpVedlS4X2p8QB7Nn0wngtoOWAY29MDULZwR90OPFUNqkx NX0pJPspKeYnp+hPG/2sZXqFxop6rwNv/jw2oFoBaZH7myXUSTHRQ3U+t6TNOJ0noP+1cd tx3PyYkt0yZGR2ZCBx+pJ9eXhRHtE00= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=faj4fGdF; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=mUmxr83w; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664456471; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mMcf2TQeX0/eb4xhoq81siCbWjBexQIYrNessvTrls0=; b=jBA8N0Bp1uhpE0NJYOYKgcCnv8eeomuLqxEsYtXogeDFf8HheGTxpmgurYFDPh6kBqjBKN svO2UgztByFig0BzbBD5lp/MX0zf8piJzB/cXWLdRM3wOkd87P1YW6VXKfwL4x6JZs0VBy ovMJyguZPSzAqdYz6QJaJoQ7+Cc4fzI= X-Stat-Signature: gty78a45mdk6xxbafcxar664f8dr9akn X-Rspamd-Queue-Id: D909116004C Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=faj4fGdF; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=mUmxr83w; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1664456470-114580 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 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) >