From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796235865; b=ynky3Llvk0MPvbWp1B/7vfNd6TQ5ctVeZPu6PJ1Cy32V9iTPJFtqYM5nmqFilfxocECx SZVswi7VrZX7B/eeaE2oKq0iYS2OeP+IipgnN+OSzO027WSNfeFOwwibmBYxitlwjuvlQ UW8I3r/LaWiqnP0tJ4LrgiPp5bEobCTCQ5r5gFvazK1ihm1+Glh/QIYpvkWbm/g8gKymw /CaN3+r2o19F0y4x10HhM2g0YtRHU6nQEZAjt8Ze5g5jRnU0wo0ct8M8BNCzFiYH4VU2P XoN36zwZG0CV9tg3N5zr7KeZYIK90RMdGUuushpoegHHwCh6aCWF1wEHnMVUOcNqSJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796235865; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=EJiz77WutVk1Se8rO0TdOTULU+UohzOwZqOrYvqi1xc=; b=b8mXmdrmUw4FZba0QVNcssXHoNipXlii/LmYBphEN6cvW5PEJFZ6KPLPOf6IIiYW76ym zn9u/yajo9xLazjc9znG51MRjP8eN3H3EFIj00nmgLHrJQMQi83xyySDokqwz8bUj5QON W9ZB/pq4Durpvxz3dJ7H0tHYb7JLmTbB1JhmAEJhBPVhGg4ahkX5lcdFgfbIagILO6jWg 9Olvd0pSQui1RdNYGGStBk01KTlslqDhqZUidrJtjQTGlWo2rXDC1+UuD8fwNlAwM+clp mSoxTSzUuwBRlbheM0l/g4iXGWAg6u1qKj4RE+gHPd5TCwAiIgwB7++s6kDvTpXnhcg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LF6UlvrU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 580D9606A322 for ; Wed, 2 Dec 2026 18:24:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LF6UlvrU Received: by smtp.kernel.org (Postfix) with ESMTPSA id B11B31F00897; Wed, 2 Dec 2026 18:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796235865; bh=EJiz77WutVk1Se8rO0TdOTULU+UohzOwZqOrYvqi1xc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LF6UlvrU2ETq/zwrl5OLxANoXQIzCVFRqnPHhvArTi9CiX9KSK3ugw/ntcT8H+PeK ZYglbAO+P1akKTgTowlP6h5NyR/7yo+M3Yxenaf08cdVtyYlBBKX08l+Vb+M0cKoXM WqJNGayv2iLym6L0yb6Sr+jNZ54MD8vWQxe9SPWo6tM3/Wb4L40VijICKfMtZE/pmV J2XmdGy+LJczcjSmB61JGIiLQJMFYU5hiZS3FiLzNY5ZMZv3KYUnSO5CfV3xOTxYiD +NPh4qOc2igiuEiIb1MK+ktlBzs4qihOJVOC7EfGbT5/X1bxk2OfWplEFRGpLbn0qg ajtc0ma297Ngw== Date: Wed, 2 Dec 2026 18:24:23 +0000 From: Harry Yoo To: Xuewen Wang Cc: vbabka@kernel.org, hao.li@linux.dev, cl@gentwo.org, rientjes@google.com, akpm@linux-foundation.org, david@kernel.org, rppt@kernel.org, mhocko@suse.com, surenb@google.com, sj@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xuewen Wang Subject: Re: [PATCH v1 1/2] tools/mm: slabinfo: fix inverted numeric sorting Message-ID: References: <20261118060317.1802620-1-wangxuewen_ky@163.com> <20261118060317.1802620-2-wangxuewen_ky@163.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261118060317.1802620-2-wangxuewen_ky@163.com> On Wed, Nov 18, 2026 at 02:03:16PM +0800, Xuewen Wang wrote: > From: Xuewen Wang > > The numeric branches of sort_slabs() return either zero or one for > unequal keys. Negating these values for -i never yields a positive > result, so the sort does not swap entries with different numeric keys. > For example, partial-slab counts 30, 10, 20 remain in that order > with -P -i instead of being sorted as 10, 20, 30. > > Return a positive or negative result for unequal numeric keys so that > the existing inversion works for size, activity, loss and partial-slab > sorting. Preserve the alphabetic tie break for equal keys and avoid > subtracting unsigned counters. > > Fixes: c09d87517298 ("slub: add slabinfo tool") > Signed-off-by: Xuewen Wang > --- Looks good to me, Acked-by: Harry Yoo (Meta) -- Cheers, Harry / Hyeonggon