Message ID | 20211201181510.18784-33-vbabka@suse.cz (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 111C3C433F5 for <linux-mm@archiver.kernel.org>; Wed, 1 Dec 2021 18:31:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17D1E6B00A1; Wed, 1 Dec 2021 13:15:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DE7226B009F; Wed, 1 Dec 2021 13:15:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A65986B00A4; Wed, 1 Dec 2021 13:15:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0205.hostedemail.com [216.40.44.205]) by kanga.kvack.org (Postfix) with ESMTP id 156216B00A1 for <linux-mm@kvack.org>; Wed, 1 Dec 2021 13:15:38 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8F3E9181616CA for <linux-mm@kvack.org>; Wed, 1 Dec 2021 18:15:22 +0000 (UTC) X-FDA: 78870027684.07.1F4B320 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf09.hostedemail.com (Postfix) with ESMTP id 007663000109 for <linux-mm@kvack.org>; Wed, 1 Dec 2021 18:15:23 +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-out2.suse.de (Postfix) with ESMTPS id 0E5C01FE01; Wed, 1 Dec 2021 18:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1638382521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlUv2OtrC7eRXASO71bKR3Wlk76iz2Ou0YyjK0XRGig=; b=DnSf2A6NCH10S73TLXwAJYUNL+xOvhQ3GN559e72v4YhgY2y7Atyff01DHcJYt6qCx9Ojt p2tM5QV+M80dELSnLNYeyfdgFnFeGjBIlkXm5jbxdh8vDRBy4DRbSG1PJvgc8S1LUS61XP orgANGZ5HfnNazPWlL1XY1ZgbxSxkKo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1638382521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlUv2OtrC7eRXASO71bKR3Wlk76iz2Ou0YyjK0XRGig=; b=QZYELxLu0RZtD+MkfYvbOD6sgO25lHF1P5GawuNdwVSS8IH5gntYr0pH56KTl7FsgheJBl mjPciRkLb19n/8BA== 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 E4E2E13D9D; Wed, 1 Dec 2021 18:15:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gJZIN7i7p2HPSAAAMHmgww (envelope-from <vbabka@suse.cz>); Wed, 01 Dec 2021 18:15:20 +0000 From: Vlastimil Babka <vbabka@suse.cz> To: Matthew Wilcox <willy@infradead.org>, Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Pekka Enberg <penberg@kernel.org> Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>, patches@lists.linux.dev, Vlastimil Babka <vbabka@suse.cz> Subject: [PATCH v2 32/33] mm/slub: Simplify struct slab slabs field definition Date: Wed, 1 Dec 2021 19:15:09 +0100 Message-Id: <20211201181510.18784-33-vbabka@suse.cz> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211201181510.18784-1-vbabka@suse.cz> References: <20211201181510.18784-1-vbabka@suse.cz> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=800; h=from:subject; bh=Bs7CnNqvzouQkyTUczu6bOXcjfNRkUUfsin8TCcV3Ow=; b=owGbwMvMwMH4QPFU8cfOlQKMp9WSGBKX7155/pJ1SuhvdR3vS332BuLpl4t8n9VPOtge/FnXearW Hh+1TkZjFgZGDgZZMUWWXu/JjCtNH0vs84g7AzOIlQlkCgMXpwBM5HEu+z+D8vwW5k1+RuLy+Q4eM4 TerfGf7bhhx626jrB3Eefc6x8vnSX+wPrv/zaf29piV1JZFH4KnjDuOy3bE7nAM//WuTQxvfY9Ex7n Kjy16Zmh1ely4XlD8ev+bLEdi9ezGHoxz17eztteEnUpud9gfXMgV67e6vUvNtqfd9LdYbRLcbbzcq uvx1varV3/c/d5us/mC63RWTzBQlys55Nv1Hep9c1aB6dODv+XdFXkkIK+dFzjFccnmzcuW/3I9bno R7v9HyqOZgtdjWPRL9u2eUKzvshB7dXr3h6/XbW6W4gtMKr9qHmIUcgrngP2+kz5JvqaMVN91No65p xztplrk28oJeaQGZDbcf2Zz+kFAA== X-Developer-Key: i=vbabka@suse.cz; a=openpgp; fpr=A940D434992C2E8E99103D50224FA7E7CC82A664 X-Stat-Signature: ucq4k5u1bxzsg771y9143j5hd6qjmpki X-Rspamd-Queue-Id: 007663000109 X-Rspamd-Server: rspam07 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=DnSf2A6N; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=QZYELxLu; spf=pass (imf09.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1638382523-222976 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
Separate struct slab from struct page
|
expand
|
On Wed, Dec 01, 2021 at 07:15:09PM +0100, Vlastimil Babka wrote: > Before commit b47291ef02b0 ("mm, slub: change percpu partial accounting from > objects to pages") we had to fit two integer fields into a native word size, so > we used short int on 32-bit and int on 64-bit via #ifdef. After that commit > there is only one integer field, so we can simply define it as int everywhere. > > Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
diff --git a/mm/slab.h b/mm/slab.h index 8c5a8c005896..ee4344a44987 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -27,11 +27,7 @@ struct slab { struct rcu_head rcu_head; struct { struct slab *next; -#ifdef CONFIG_64BIT int slabs; /* Nr of slabs left */ -#else - short int slabs; -#endif }; }; struct kmem_cache *slab_cache;
Before commit b47291ef02b0 ("mm, slub: change percpu partial accounting from objects to pages") we had to fit two integer fields into a native word size, so we used short int on 32-bit and int on 64-bit via #ifdef. After that commit there is only one integer field, so we can simply define it as int everywhere. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> --- mm/slab.h | 4 ---- 1 file changed, 4 deletions(-)