From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 5E3CE2BEFF5 for ; Fri, 23 Jan 2026 15:19:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769181601; cv=none; b=dauSqsVZwj+1oUBRZNYfDmWg2KjX57SCP4ZGH2V7ctycN11kBi/p+ZstRg8HH17h+td4KQl+JXw8c9QeHKw3zZ49LK5A0q1ol+STFb6BzgwX43ilZijS+4MtUZp6CYfDOWYQjP/0joxiv4NVlEXK6oDz6GxfoNP0bMBeI41Vhu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769181601; c=relaxed/simple; bh=0WBx4s+e/wbxQS/gsSFYJUqyDIpclrkuKOR6IkNRheQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kPLKp6ztQDprAs2mOZ2zQLhyGA6MIBPHj3Y80VZaWq1DNYgDGNizbWtE9pWU9ZV9W7Jk7iXOCuvyz8TPcqbycdPEhGrGWuaLz/huxloauBVY62fhN+NT0P5gdNk6kTw5BbSwPMCV00jYyOlL+Afw16ouIeIKQvO3xvgeijeCkn4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=snKtDNlA; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="snKtDNlA" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6JmFhL/SCAYCGHLafTsex3OPzbrlitsDSrF+Rrnv3bY=; b=snKtDNlAFsEpEKiwCMvJQl6YLL C5JwXAdUcx5r6Z+mYeidD5OSEBvC3YCYz++uU1XDjSabN6AU1spOsBPIu6eVvyaAzb05YBAzRkDc1 k2TsFDzKxAMaNZTxd8mmZvNr70RpQHCqDaTVBAkm28zwflCOTpMMGbVesQ2niF522fK4Lel/bVBs5 +BFq0Y9EVElpIoE7LMP2IdaSPFyNvl/FLpJaSBdCucLsVO52L1BdEY3Wl4m1CLISzPD2fddbgxLil PQWrBa3ZI3kRVWmNohW1ygeMJDmQsbfNESC7clXgKwKohk2cVLxTf/Dzpnd2bnLfed5LaVUXFODMG om3ZdClg==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vjIwi-00000001vV8-18ac; Fri, 23 Jan 2026 15:19:36 +0000 Date: Fri, 23 Jan 2026 15:19:36 +0000 From: Matthew Wilcox To: Vernon Yang Cc: akpm@linux-foundation.org, david@kernel.org, lorenzo.stoakes@oracle.com, ziy@nvidia.com, dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vernon Yang Subject: Re: [PATCH mm-new v5 2/5] mm: khugepaged: refine scan progress number Message-ID: References: <20260123082232.16413-1-vernon2gm@gmail.com> <20260123082232.16413-3-vernon2gm@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260123082232.16413-3-vernon2gm@gmail.com> On Fri, Jan 23, 2026 at 04:22:29PM +0800, Vernon Yang wrote: > + if (cur_progress) { > + unsigned long idx = xas_get_index(&xas) - start; I agree with Dev. This is less readable than: unsigned long idx = xas.xa_index - start;