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 83C81C433F5 for ; Thu, 29 Sep 2022 11:53:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E30108D0002; Thu, 29 Sep 2022 07:53:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D916D8D0001; Thu, 29 Sep 2022 07:53:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C32258D0002; Thu, 29 Sep 2022 07:53:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AF7008D0001 for ; Thu, 29 Sep 2022 07:53:25 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8394E12092E for ; Thu, 29 Sep 2022 11:53:25 +0000 (UTC) X-FDA: 79964962770.10.7DDA43D Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by imf14.hostedemail.com (Postfix) with ESMTP id E5C9C100003 for ; Thu, 29 Sep 2022 11:53:24 +0000 (UTC) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-322-FG1UcietOBqlK6YUwDSrzw-1; Thu, 29 Sep 2022 12:53:20 +0100 X-MC-Unique: FG1UcietOBqlK6YUwDSrzw-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Thu, 29 Sep 2022 12:53:17 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.040; Thu, 29 Sep 2022 12:53:17 +0100 From: David Laight To: 'Hugh Dickins' , Vlastimil Babka CC: 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 Thread-Topic: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE Thread-Index: AQHY02LHNvo5HN+EEECxPXiP8YKQXa32TN+Q Date: Thu, 29 Sep 2022 11:53:17 +0000 Message-ID: <9368c760191448bba0e062709cc7c799@AcuMS.aculab.com> References: <35502bdd-1a78-dea1-6ac3-6ff1bcc073fa@suse.cz> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664452405; a=rsa-sha256; cv=none; b=taDVGF4ubNmTwQL16kvjtDiocLv4/HNOy7/HZvh4vkGFsQOxCL0nyIWqiq8tZNqUyfmi5F ZOuCVCyhrmhCuBTIhQB0qPEDj9uPWrIDx6l/XNmJRe66TdMg7UqeocBpqYarY2IPKWmUGY UEKceGD6UhfJAcp34xPGc6wvnnAUmEQ= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of david.laight@aculab.com designates 185.58.85.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com; dmarc=pass (policy=none) header.from=aculab.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664452405; 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; bh=urqjLxLq9ZhGNSM91C8E+pTt1Vq5GGqqJR6ZSPBArcE=; b=hi4jIdp6ftPuKTUSH5KmpIAWKn4+pX6WNxrvckFM/kZlfnvMwoMJzOGW2E6GrdoZASKpIr cr/xNN0V6hrCkYcYPt1ougU0iYN+vJWGkfXB8RKm2p9XCZb796HgnqsYWMbhNhsHEGjkSl HKaCePnJ+tRIM/Q14aC5Ptu37SKj94g= X-Stat-Signature: qp411gmpyzqrusmwapqmwg7zbeit7c71 X-Rspamd-Queue-Id: E5C9C100003 X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of david.laight@aculab.com designates 185.58.85.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com; dmarc=pass (policy=none) header.from=aculab.com X-Rspamd-Server: rspam01 X-HE-Tag: 1664452404-131888 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000215, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > -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) > { > =09struct slab *slab =3D container_of(h, struct slab, rcu_head); >=20 Isn't that going to cause grief with options that align functions on 16/32byte boundaries when adding space for 'other stuff'? =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)