From patchwork Fri Jun 7 08:40:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengming Zhou X-Patchwork-Id: 13689486 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 BC73CC27C53 for ; Fri, 7 Jun 2024 08:41:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 488C46B00B3; Fri, 7 Jun 2024 04:41:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 414646B00B4; Fri, 7 Jun 2024 04:41:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B28D6B00B5; Fri, 7 Jun 2024 04:41:05 -0400 (EDT) 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 0672F6B00B3 for ; Fri, 7 Jun 2024 04:41:04 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7C6C7C1808 for ; Fri, 7 Jun 2024 08:41:04 +0000 (UTC) X-FDA: 82203447648.03.5AD9080 Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) by imf01.hostedemail.com (Postfix) with ESMTP id 082004001D for ; Fri, 7 Jun 2024 08:41:01 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=FRcixKR6; spf=pass (imf01.hostedemail.com: domain of chengming.zhou@linux.dev designates 91.218.175.175 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717749662; 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=ry4pUT0wLp2rsQ9gaswXTMi4aahc6CD0b0+IGJL1qoc=; b=8U/0EpDHwECQIkZ9IC+A+uUqsgURJCXATa1bkjJ4vvf4nGhqDM1Em2ZkUkh/+Xe6R6vB/p vw7sY4iQa8RfwlGA6mVRJxy9E6nTfFC11OqUMi1+gg0UmPNo79tcDXpoUeG/rNG4vYDHsw ABinu/77SQm4SPwDkbfM5NpNXH8vr+g= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=FRcixKR6; spf=pass (imf01.hostedemail.com: domain of chengming.zhou@linux.dev designates 91.218.175.175 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717749662; a=rsa-sha256; cv=none; b=Ppil7G8Ios6CLo0DgIO4EPA0w0B1HtwFAHHy0edU6hnZcbhncts9dkCXrfh2qm5Tq3fE8C dG3FcToJknaW4tBNGIXBMzZuRzUOgGVBkoHZgxhFWaTAqWswo4BsJ1pZkoDL3hARxIRzZa bT6jLFqQ/TUrV/8EYIEGLP53SNuc0Us= X-Envelope-To: akpm@linux-foundation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717749660; h=from:from: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=ry4pUT0wLp2rsQ9gaswXTMi4aahc6CD0b0+IGJL1qoc=; b=FRcixKR6sKrZnRAihVBRcSYK+FzLr1DTKGdjp7gt7YjG5xNLhkZKrAE/H76ecCGUaGvyEl +Q/8BaJeIRX2/qAySlikCNZYqDOygv5xawpTX5p4zGCiiOujXilQsF0sT6oyL3SNYihAuY OqAYNTMpowc1/RKf+uZ2zKUROli77is= X-Envelope-To: cl@linux.com X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: penberg@kernel.org X-Envelope-To: vbabka@suse.cz X-Envelope-To: roman.gushchin@linux.dev X-Envelope-To: iamjoonsoo.kim@lge.com X-Envelope-To: 42.hyeyoo@gmail.com X-Envelope-To: rientjes@google.com X-Envelope-To: linux-mm@kvack.org X-Envelope-To: zhouchengming@bytedance.com X-Envelope-To: feng.tang@intel.com X-Envelope-To: chengming.zhou@linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou Date: Fri, 07 Jun 2024 16:40:14 +0800 Subject: [PATCH v3 3/3] slab: delete useless RED_INACTIVE and RED_ACTIVE MIME-Version: 1.0 Message-Id: <20240607-b4-slab-debug-v3-3-bb2a326c4ceb@linux.dev> References: <20240607-b4-slab-debug-v3-0-bb2a326c4ceb@linux.dev> In-Reply-To: <20240607-b4-slab-debug-v3-0-bb2a326c4ceb@linux.dev> To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Feng Tang Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com, Chengming Zhou X-Developer-Signature: v=1; a=ed25519-sha256; t=1717749639; l=2492; i=chengming.zhou@linux.dev; s=20240508; h=from:subject:message-id; bh=HrPAwtMOeYeTV8i4zs/HyF+XzjWDLITsYcMCCwBJKjk=; b=0CWA1/J60O55kCn+Cliv8N6QcksKBT2/nb1uYUtntzcYzA4/3nHZS/oGeU/wqaO43cxUe9VK3 x/KnumkFAuTCC+ZC6HiCZJwshbZvD3XI8TRNVUKnUxr7RfCfVjRiD/G X-Developer-Key: i=chengming.zhou@linux.dev; a=ed25519; pk=kx40VUetZeR6MuiqrM7kPCcGakk1md0Az5qHwb6gBdU= X-Migadu-Flow: FLOW_OUT X-Stat-Signature: 71qaoo5kpmi3kweyxbig6kyzcdehktno X-Rspamd-Queue-Id: 082004001D X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1717749661-886670 X-HE-Meta: U2FsdGVkX1+NITnR5ySe85DuxvEvmmqzA2MH+REPkUrtzbjpWbiRORc/g3QWHk6ssGYwSAMbUvHMIr1UQmsNIpqPPzC3Kld4nHsK6WiJC/4hp42MXbSefein2jMtG9XkAQO0onyEw12D2Ab3dRvaf22r9X41hqP1Cp+BPX3UdljhqiMZnn+yGOY9lSHRtoPUvTTO6wn0JAxAmb5+lwpWsWdXS8XKqM+EFetpGiU8majDmElcHdvFJySBPLYNJ17a3JyKWAGXVKKHY10zOOpH3/7Zcgag5I/9XvqpeXurcZ8a9dfAA0I7JTmWiUqEPiblBUH+Hf3tPfreW3G5R8djiWAtD+i+0rImxuTYWr/i2I8vZjsaXSKCTrHclB5/Vu3ZB0VdZdx16keElj8FbhBbVdsle4XWCd8jRTkPX0IgqiyeCloT1YJcINB8yD8PyjSWjbwCYO7EazTFrWOrzjOWm4Mqa+du/mz2oclCz85GO+5mUQhv2WAe1LS4mIL5UqX5+vBsFHQF8r6mEaI5GZKE3b1eVAUEG6GUIQga0kjQHbmuldxhCzqjL8Je6agdA/vUBlZI69Taup10tzKWPLznRN7YBwX9hM8cfCeUOsoKkYfZx8xGoh/dkjaBeAbxarKubK3s4CUHsJNcZiMw9LIcXgiutAzwFsFA+aK9VpBqCS7b+k5DSjOLsfG6a1JyAqkUmfsEZGPEuShp4kdIVjYM75gnCIaTgTTbtAWGK6aUGThs4WziNyxFJaYRd6vvr1VvUET4R5+95T9dkKILvL4POlV+8WCz/BLQ26sJMMHor4gU3Hd2tD/6yZvmlvUMrGCgliZ40A4U9+gBrrZKyJb887NILeqTOqyAStwFErYqo+8dSbtJg+9EIN7DtifmNXrsHWqmnTkVCaupGGnjTKdZ8/lQ7g1uhEo8MEppipgB8PnxPgx4N/e5xywnjPS2q2MhsET8PQVoFaipyInyN7h p5zERuy3 0ul5IrwUjmGv9iXf2v7H9UcD1sOCpQ0dy28obdqL1eZdF5tUoQ5RBASoFZKe35Lj6xNN8qjk9Wet+IBLTJ2Ck/TIOgYmf1azC0HrUqNCZj3W+srrAswzDLHIZlhWlFiDthF4WhDtYKYiFIkj88G3winrzmKCUfxAkzvh+mDqD9VzlLzlsV7Gq2+nOVLcKKUQZa8WSwOgGdsfmTTM= 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: List-Subscribe: List-Unsubscribe: These seem useless since we use the SLUB_RED_INACTIVE and SLUB_RED_ACTIVE, so just delete them, no functional change. Reviewed-by: Vlastimil Babka Signed-off-by: Chengming Zhou --- include/linux/poison.h | 7 ++----- mm/slub.c | 4 ++-- tools/include/linux/poison.h | 7 ++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/include/linux/poison.h b/include/linux/poison.h index 1f0ee2459f2a..9c1a035af97c 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -38,11 +38,8 @@ * Magic nums for obj red zoning. * Placed in the first word before and the first word after an obj. */ -#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ -#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ - -#define SLUB_RED_INACTIVE 0xbb -#define SLUB_RED_ACTIVE 0xcc +#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */ +#define SLUB_RED_ACTIVE 0xcc /* when obj is active */ /* ...and for poisoning */ #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ diff --git a/mm/slub.c b/mm/slub.c index 1551a0345650..efa7c88d8d8c 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1230,8 +1230,8 @@ static int check_bytes_and_report(struct kmem_cache *s, struct slab *slab, * Padding is extended by another word if Redzoning is enabled and * object_size == inuse. * - * We fill with 0xbb (RED_INACTIVE) for inactive objects and with - * 0xcc (RED_ACTIVE) for objects in use. + * We fill with 0xbb (SLUB_RED_INACTIVE) for inactive objects and with + * 0xcc (SLUB_RED_ACTIVE) for objects in use. * * object + s->inuse * Meta data starts here. diff --git a/tools/include/linux/poison.h b/tools/include/linux/poison.h index 2e6338ac5eed..e530e54046c9 100644 --- a/tools/include/linux/poison.h +++ b/tools/include/linux/poison.h @@ -47,11 +47,8 @@ * Magic nums for obj red zoning. * Placed in the first word before and the first word after an obj. */ -#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ -#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ - -#define SLUB_RED_INACTIVE 0xbb -#define SLUB_RED_ACTIVE 0xcc +#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */ +#define SLUB_RED_ACTIVE 0xcc /* when obj is active */ /* ...and for poisoning */ #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */