From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECBF53A3E9A for ; Wed, 22 Apr 2026 03:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776829073; cv=none; b=E3zQKrlJDcbl3VjRTmL4W3vKQOK10vfZjq/ZCi8K/wWgWZR6BUFkEQt1Ocw0J4eHPB5p9Aq0VzahC9wimANDDRlNYbMZUJRbi/WUNosGN9uSAZxxlluhQJkFVugsrtaZnp75+e9zqcligFpXSzAcIpldC9Rj9uJP3BsIyzzfXY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776829073; c=relaxed/simple; bh=uoYxziYZh1LR5zGgd2qxIq0rfxSrw0utXd6TZsqxYyE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZevnePasxHHA1QR+eHCQMGlSVCZV4u15Jl4aSA1hg8eS+0/Oh2tZwPQEbeRiJNqD38Ib/tLOr0j2B2qqFaSe1daxDWc8fGHPboCv2PIKDMztJ5TLxwwG015cag5JYFimEtx1D+E2ElutphWbj7KYZiP6eQvRmF+s9eohvO0ZORc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=golOrKPi; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="golOrKPi" Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-8dbbc6c16b2so622244685a.0 for ; Tue, 21 Apr 2026 20:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1776829071; x=1777433871; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pxPqWuBU2oFFyikxF8LUvXvxrcVBiFKCu6t827VR+oQ=; b=golOrKPi/n7www/fBuedn4LnwnpuRpH/UjlHi6+Pb1WDSZ7sR+JtnIJXh1gtulZFTD OeB6dfC5x1KK8z2sDa4J3D+5z4iLOha/PKOgBRVvDRvTLxOT2eW8GFr23QnDtD011fs2 Wj8cgbsh+cMw6n4MSl6vljOcrS01KnjM0kBhr6ToqGoOEUa7QVYqqnWnx8M8UWGua4VG CCRswasNzzUfTPKuZiBxPMZBSNmFUbNxA4gjHlYLCGual+IE7djWfZFaXkZ/jTpzFgxr CAPuX6YKbO/nNcudP85g8AG8Q3EYBaEaeGz29r7yDEX9DJRXZ5L2D7VGtzQL4tfjxTRO 6X3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776829071; x=1777433871; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxPqWuBU2oFFyikxF8LUvXvxrcVBiFKCu6t827VR+oQ=; b=IZcnzurKZFdd9G9qYzeU65Kahb7Z9Kzla37/vecDYAOBdXqUD0wImxVdruhxkNCC1m pXvGubVERTFSZijz92GLlHxFV9cuaeHeNzTOZlQhPCjkE6Tbtuup/Fg1GGnCkn+MvQrF r88pnJIw4Dhh/APhv6OimNundYq/88PNtLheqWasOK15wUNcc/t0fknLWaR4EVgyM2GL kCHNdhrhQbHrJa1qw+mxuUbq+u1i1a7Ax1LmFEPZGHTZAkk6gNnOWWQxbSgjODfQ+YU+ kYdjqxOlDRmOo1VSjgPCDEdj7rDLeh3oBAWBJb0PUoGqyhEQV+JC1hbxlwltkP0d/8ry hNAg== X-Forwarded-Encrypted: i=1; AFNElJ+7fk9oDGj8BQpC8xxOJkrvdZ+QzU0vGDrk6EY1bESzGsbWKbkww8IgeG7fqMflkKZXRzb5iZnxpCUEI7M=@vger.kernel.org X-Gm-Message-State: AOJu0YzVQ4Sm6fticCRy5NiwPfUUjocMInolGIag4mIyfONRhyla2AmJ ZVnTvIE33jfMhw9zGw1BnvfysGMtaWqFFC6uTedyuq+5c847fbPLgw++oJZw1v6fIs8= X-Gm-Gg: AeBDieuP/vDup7SIlE0QcMH+yfoYIDgOSWPkDFdNFHF4p/C4RtietjHA0SHHivMRKaA kj/sSz4jFX6gXpsU3pQ+WrrhrS9DpfWn+p0JSsvlBjWXQHhRMtOuBSe3zkKNMfcFnPcifDsATxV JRP0vbl5j8Cbc3n8zrvZkf9AYQINalaCrkib9NsmzyO1RwEwDNbfo0hAqgNb3oFMalBDWTqs53I CD6+Fu3ookaihSe1KeTnsmuwjW16Jlr/Ju0cZN6lq0WQOV+jVFPjdVEb41Nkv6kluSjbeTrqwxU 4s9dlj44eTgc68SYxk/Xuh5qVlezxjmQ4QOhLL5zF+9YyBYY/Ua336sLlNX72zel24q2/F3u90M HCqlzuk1rqkeii3emBj6UPYlzQTKmkqETMM+V3NWz/xXHR4nrcEY15mB4DEVp9DTfWR3GeY6xK3 WaHjTGJgBbRutK1wm/30RDYR5wa665/vFX/iKVJVWsn4/Z58m13vk7yy1kaFAqDEAHbAuPfOhiW fb4uBDVKMgDWInusOA41ONd7MyIlww= X-Received: by 2002:a05:620a:170c:b0:8ef:6b87:5c4e with SMTP id af79cd13be357-8ef6b96ab82mr327111185a.20.1776829070854; Tue, 21 Apr 2026 20:37:50 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-71-246-228-50.washdc.fios.verizon.net. [71.246.228.50]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8e7d8edb789sm1331917885a.31.2026.04.21.20.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2026 20:37:50 -0700 (PDT) Date: Tue, 21 Apr 2026 23:37:48 -0400 From: Gregory Price To: Bharata B Rao Cc: Donet Tom , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jonathan.Cameron@huawei.com, dave.hansen@intel.com, mgorman@techsingularity.net, mingo@redhat.com, peterz@infradead.org, raghavendra.kt@amd.com, riel@surriel.com, rientjes@google.com, sj@kernel.org, weixugc@google.com, willy@infradead.org, ying.huang@linux.alibaba.com, ziy@nvidia.com, dave@stgolabs.net, nifan.cxl@gmail.com, xuezhengchu@huawei.com, yiannis@zptcorp.com, akpm@linux-foundation.org, david@redhat.com, byungchul@sk.com, kinseyho@google.com, joshua.hahnjy@gmail.com, yuanchu@google.com, balbirs@nvidia.com, alok.rathore@samsung.com, shivankg@amd.com Subject: Re: [RFC PATCH v6 2/5] mm: migrate: Add migrate_misplaced_folios_batch() Message-ID: References: <20260323095104.238982-1-bharata@amd.com> <20260323095104.238982-3-bharata@amd.com> <24cd6a95-1304-4732-9273-43c73ea858b2@linux.ibm.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: On Wed, Apr 22, 2026 at 08:56:59AM +0530, Bharata B Rao wrote: > On 21-Apr-26 9:35 PM, Gregory Price wrote: > > On Tue, Apr 21, 2026 at 08:55:02PM +0530, Donet Tom wrote: > >>> +/** > >>> + * migrate_misplaced_folios_batch() - Batch variant of migrate_misplaced_folio > >>> + * Attempts to migrate a folio list to the specified destination. > >>> + * @folio_list: Isolated list of folios to be batch-migrated. > >>> + * @node: The NUMA node ID to where the folios should be migrated. > >>> + * > >>> + * Caller is expected to have isolated the folios by calling > >>> + * migrate_misplaced_folio_prepare(), which will result in an > >>> + * elevated reference count on the folio. All the isolated folios > >>> + * in the list must belong to the same memcg so that NUMA_PAGE_MIGRATE > >>> + * stat can be attributed correctly to the memcg. > > ^ This is the expectation from the caller. pghot caller ensures this. > I could add a debug check in this routine to verify if that is indeed so. > Wondering if the interface name should somehow reflect this as well, to make it a bit clearer. ~Gregory