From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF2E840D598 for ; Fri, 19 Jun 2026 05:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781846344; cv=none; b=kU6+y9llhUQbQk2lZXmIQIw68CgPqszWvDx4JRlaC9K4pfJFlZN4uHlGEMu3DFz8MU3l7SUH3tWMryeGvqOuHyrB7i/Cqia5Xk5mZVRNsauXQfDHt38FvCoOLxgUQJFdQSM/0sJCbS3i6yW++/UnS6Izd39LJd9hqv1oKhRTbPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781846344; c=relaxed/simple; bh=CWcGLknwn+UX1XmscLK/augchTG4Rj6iK6PLpj/q6p8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HHgGILxqEW3KHeQotmod3l/EYnfYejKHRsGKgdOZVBc2lBndy12bNftIPugW4uUw8P5vMy3iUlA1iEZRtENGiDxAr8W7VWdn614vCUEtDPBinVSc3d3DC+Bkjt111kgUnpiJNJW+l7+Si+IZHEYhyfFyCITYFkfOoR+irZB/WYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aHSq15pi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aHSq15pi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DB4F1F000E9; Fri, 19 Jun 2026 05:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781846343; bh=n0WQXKZa/yAPHQbUs9dLkQN2esDMhYBXPa9Lzf4iMSw=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=aHSq15piz7ld4db3e46JH3zywFyou9Lf3nDfq+LVIm+k3H3ga6j2j4IIyBfRGdLsA 1jk+CKcHK6momeyF3IxCxQPhE8LSXJgpwzhhKKegYFSOQdNkTuw0depL2nkkf66pEx Tkk7BDabM25+Sbk2H5lnco1x7xko06vhe1Zz888SNY2VS8PvV7q77a8W8Ku08MLOVO jv5FXWtsctGR87yD+DBMRmtArRPqGzf0PhPkCiWywMLVDw9h0F0V4JZFHE3pZQaTvj dql2Qu5PDMsRwd/e1PAChINPTgk2FFyc/Iyj0tV8Fgd+9LpdLNjG8DwpKN9jTPNPyo /4OwhRgUdx3Rg== Message-ID: Date: Fri, 19 Jun 2026 14:18:55 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tools/mm/slabinfo: fix total_objects attribute name To: Vlastimil Babka , Yichong Chen , akpm@linux-foundation.org, Harry Yoo Cc: penberg@cs.helsinki.fi, clameter@sgi.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park , Hao Li References: <96556748872BB47E+20260612071359.649946-1-chenyichong@uniontech.com> <65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com> Content-Language: en-US From: Harry Yoo In-Reply-To: <65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------LFY6cLE1Bu0c2UNxfoLl1Cto" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------LFY6cLE1Bu0c2UNxfoLl1Cto Content-Type: multipart/mixed; boundary="------------bzR0xRRP6eTD0Reb1mV1IqiT"; protected-headers="v1" From: Harry Yoo To: Vlastimil Babka , Yichong Chen , akpm@linux-foundation.org, Harry Yoo Cc: penberg@cs.helsinki.fi, clameter@sgi.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park , Hao Li Message-ID: Subject: Re: [PATCH] tools/mm/slabinfo: fix total_objects attribute name References: <96556748872BB47E+20260612071359.649946-1-chenyichong@uniontech.com> <65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com> In-Reply-To: <65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com> --------------bzR0xRRP6eTD0Reb1mV1IqiT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 6/18/26 6:18 PM, Vlastimil Babka wrote: > On 6/12/26 09:13, Yichong Chen wrote: >> SLUB exports the total_objects sysfs attribute, but slabinfo tries to = read >> objects_total. As a result, the lookup fails and the field remains zer= o. >> >> Use the correct attribute name and rename the corresponding structure >> member to match. >> >> Fixes: 205ab99dd103 ("slub: Update statistics handling for variable or= der slabs") >=20 > Huh, it has never worked correctly, since 2008. slabinfo.c needs some love :) > Applied to slab/for-next, thanks! FWIW, Acked-by: Harry Yoo (Oracle) Thanks! >> Signed-off-by: Yichong Chen >> --- >> tools/mm/slabinfo.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c >> index 54c7265ab52d..f4077746d6df 100644 >> --- a/tools/mm/slabinfo.c >> +++ b/tools/mm/slabinfo.c >> @@ -33,7 +33,7 @@ struct slabinfo { >> unsigned int hwcache_align, object_size, objs_per_slab; >> unsigned int sanity_checks, slab_size, store_user, trace; >> int order, poison, reclaim_account, red_zone; >> - unsigned long partial, objects, slabs, objects_partial, objects_tota= l; >> + unsigned long partial, objects, slabs, objects_partial, total_object= s; >> unsigned long alloc_fastpath, alloc_slowpath; >> unsigned long free_fastpath, free_slowpath; >> unsigned long free_frozen, free_add_partial, free_remove_partial; >> @@ -1263,7 +1263,7 @@ static void read_slab_dir(void) >> slab->object_size =3D get_obj("object_size"); >> slab->objects =3D get_obj("objects"); >> slab->objects_partial =3D get_obj("objects_partial"); >> - slab->objects_total =3D get_obj("objects_total"); >> + slab->total_objects =3D get_obj("total_objects"); >> slab->objs_per_slab =3D get_obj("objs_per_slab"); >> slab->order =3D get_obj("order"); >> slab->partial =3D get_obj("partial"); --=20 Cheers, Harry / Hyeonggon --------------bzR0xRRP6eTD0Reb1mV1IqiT-- --------------LFY6cLE1Bu0c2UNxfoLl1Cto Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQQ1ub6gR5ogjaKRmOGXBN6rc5S1gUCajTRPwAKCRCGXBN6rc5S 1hQxAQC5C2t9YzgCVPUaklGgWHjPIVj1tDL4vS7pZxKrRpySCAEAlw6zlPfzHnYE n3ysAn49QVu4bQ2l8bNTJy245zLozQI= =uudy -----END PGP SIGNATURE----- --------------LFY6cLE1Bu0c2UNxfoLl1Cto--