From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6E33610B for ; Wed, 23 Oct 2024 04:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729657155; cv=none; b=FbolYM5Z5jhd/sSytvsIxDpMsqS1ZjUn9XFUyzn9S/+R4naNPixsiHnWwcY/pPApR7jlZOaSP4dcoJitCgwO7v0bqqjXhScioXRoV3d3DMSqaKPuI9Zl94T+qe8/jrbG2xK8NVVQY8KgGoIZDA9a4JDuINb1p3yyPP/NAWYt/Ro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729657155; c=relaxed/simple; bh=MCZS0B04eTyoXSI7kMSmUrZac3YdkoSIjpgaDTjHohI=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=LX7h+TBP8qexy68Izv1tfONCqttpxnal5uj12a4hBl9VEUFIoNJW/ZDTqSdEAB9TvDmYI8qMqybkgFP90ExDGFybebsMtRd7gA9vAzp9ny+mM1Rh2mBqF8suQ97prnOSt0hqV/xYYRQLjkGoVM15gjfgB4vueCcL+IfryxG9QpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84C24339; Tue, 22 Oct 2024 21:19:41 -0700 (PDT) Received: from [10.163.41.228] (unknown [10.163.41.228]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E7413F528; Tue, 22 Oct 2024 21:19:08 -0700 (PDT) Message-ID: <49a7dbae-d382-4b60-b08e-2aaca9eb343f@arm.com> Date: Wed, 23 Oct 2024 09:49:07 +0530 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 v2] mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub To: Sourav Panda , akpm@linux-foundation.org, surenb@google.com, yuzhao@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pasha.tatashin@soleen.com, weixugc@google.com References: <20241022232440.334820-1-souravpanda@google.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <20241022232440.334820-1-souravpanda@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/23/24 04:54, Sourav Panda wrote: > alloc_tag_sub() takes bytes as opposed to number of pages as argument. > > Currently pgalloc_tag_copy() passes the number of pages. This fix passes > the correct unit, which is the number of bytes allocated. > > Fixes: e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()") > Signed-off-by: Sourav Panda > Acked-by: Suren Baghdasaryan > Reviewed-by: Pasha Tatashin > --- > Changelog: > Added Acked-by: Suren Baghdasaryan > Added Reviewed-by: Pasha Tatashin Very minor nit. Just mentioning that the tags have been picked up should suffice. > Fixed the nit pointed by Wei in the commit message > > v1: > https://lore.kernel.org/all/20241022205622.133697-1-souravpanda@google.com/ > --- > include/linux/mm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ecf63d2b0582..2890001c8b97 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -4203,7 +4203,7 @@ static inline void pgalloc_tag_copy(struct folio *new, struct folio *old) > /* Clear the old ref to the original allocation tag. */ > clear_page_tag_ref(&old->page); > /* Decrement the counters of the tag on get_new_folio. */ > - alloc_tag_sub(ref, folio_nr_pages(new)); > + alloc_tag_sub(ref, folio_size(new)); > > __alloc_tag_ref_set(ref, tag); > Reviewed-by: Anshuman Khandual