Message ID | 20240117-slab-misc-v2-2-81766907896e@bytedance.com (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 2234FC47DDB for <linux-mm@archiver.kernel.org>; Tue, 23 Jan 2024 09:34:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA79C6B0083; Tue, 23 Jan 2024 04:33:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A57D26B0087; Tue, 23 Jan 2024 04:33:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 920E36B0089; Tue, 23 Jan 2024 04:33:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 82D296B0083 for <linux-mm@kvack.org>; Tue, 23 Jan 2024 04:33:59 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5CDA4A1E6A for <linux-mm@kvack.org>; Tue, 23 Jan 2024 09:33:59 +0000 (UTC) X-FDA: 81710064198.03.9F71E65 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) by imf04.hostedemail.com (Postfix) with ESMTP id 8300F4000F for <linux-mm@kvack.org>; Tue, 23 Jan 2024 09:33:57 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=bytedance.com (policy=quarantine); spf=pass (imf04.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.170 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706002437; 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=MVB7ftxAIVcq2QIA10U3ciYcZCcQ0jJHuOcqORi4sOA=; b=lrnwPba10nFniSCul7+YmsRUlKVpSCvix3z7B8X+rysK/BOkDbWyUsNKL4y8HoLsPg8kAz 3zF/8bXqfR66hOOMzGiYUH4Jc50RiPIsgBD1l1C8f3+L9DPMnc5SGR00FqBR8CKI32UxVg VeYLm0snbVaAZjTwbpFTG6NP3OyR7Sw= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=bytedance.com (policy=quarantine); spf=pass (imf04.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.170 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706002437; a=rsa-sha256; cv=none; b=Hu6tA/ptrXVWoVfOCei1VeUE2l8DeNlwTnJ5ODmPGLxZkJrAFSdwZ0m3wIY0nmCff9zPBj PdLxpcI8UNvH8QGPdWzOqkIp5R7y5ueVKuj5gOD8yqTko8MNShSn4jgit+aAYYJuCwz6s8 A2dMsT7lYPi5EPwCH8n8mews46XXOa0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou <zhouchengming@bytedance.com> Date: Tue, 23 Jan 2024 09:33:30 +0000 Subject: [PATCH v2 2/3] mm/slub: remove full list manipulation for non-debug slab MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240117-slab-misc-v2-2-81766907896e@bytedance.com> References: <20240117-slab-misc-v2-0-81766907896e@bytedance.com> In-Reply-To: <20240117-slab-misc-v2-0-81766907896e@bytedance.com> To: Joonsoo Kim <iamjoonsoo.kim@lge.com>, Vlastimil Babka <vbabka@suse.cz>, David Rientjes <rientjes@google.com>, Roman Gushchin <roman.gushchin@linux.dev>, Pekka Enberg <penberg@kernel.org>, Christoph Lameter <cl@linux.com>, Andrew Morton <akpm@linux-foundation.org>, Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz>, linux-kernel@vger.kernel.org, Chengming Zhou <zhouchengming@bytedance.com>, linux-mm@kvack.org, "Christoph Lameter (Ampere)" <cl@linux.com> X-Developer-Signature: v=1; a=ed25519-sha256; t=1706002427; l=1153; i=zhouchengming@bytedance.com; s=20231204; h=from:subject:message-id; bh=cuwSKTPtiNqZTZ2D9xT7/HRhzSDVJccC9FWGQ4Ep0yw=; b=mJdc+YnrEwU86ZPAWNO2hIOji1KtwvraB80SdFXY8/3S14XjUgouN7U9QY4VsPfbv0iWMF2qa jNF2VdpUcx9CAUqOdk6g8VKSrJo7sg3GFd7D/n6FIaKYhdVOjnloqeD X-Developer-Key: i=zhouchengming@bytedance.com; a=ed25519; pk=xFTmRtMG3vELGJBUiml7OYNdM393WOMv0iWWeQEVVdA= X-Migadu-Flow: FLOW_OUT X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Rspam-User: X-Rspamd-Queue-Id: 8300F4000F X-Rspamd-Server: rspam05 X-Stat-Signature: npbt889wkcuw8c1rggid38xxwx737puw X-Rspam: Yes X-HE-Tag: 1706002437-939872 X-HE-Meta: U2FsdGVkX1/5ccsDRdlM57GDmfuFcciG8jaQu1UDTku2jCOaqh283cZxMAHV5knKPh2af66wydFMB1Tyit8ZHy4KJ8k+HEQhHjDs0pfypzTGr1mKWgrZPOXVXAIQnvcixrBQpn6/5KPqe5VzBxifJlZFmKfAofay34iHp7RFOM5Kk1nyIdHQzhPU7/sGDHOW5QvAJOCXDdUObsdFge169kQm0sPNO43NB2LaSsy3Aq2P1p7BsM5mqC4hvuN7JV5gNMxFySxC3l8/mnMd7h2K8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W9gI6fvNnhhpzLysiaAyDC3B1OIUB1DPxBWiJCKWiwtdHXjzLAQP6Os6idmZxN05SYClvaGcQZ6rspbSvJXRxpLFlz8SOd6 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/slub: some minor optimization and cleanup
|
expand
|
diff --git a/mm/slub.c b/mm/slub.c index fda402b2d649..5c6fbeef05a8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4188,7 +4188,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab, * then add it. */ if (!kmem_cache_has_cpu_partial(s) && unlikely(!prior)) { - remove_full(s, n, slab); add_partial(n, slab, DEACTIVATE_TO_TAIL); stat(s, FREE_ADD_PARTIAL); } @@ -4202,9 +4201,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab, */ remove_partial(n, slab); stat(s, FREE_REMOVE_PARTIAL); - } else { - /* Slab must be on the full list */ - remove_full(s, n, slab); } spin_unlock_irqrestore(&n->list_lock, flags);