From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (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 44FCD330337 for ; Mon, 20 Jul 2026 11:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784546403; cv=none; b=HEf9IBlLzF5iNi7L97xfd3nIo0OU2YuHla19IP1hPWNV5PyBuOLlUUwbY8dpH8Uy4Vvml0dRTsb/T0TqXkjqZ+B33QwpH8ZzAQWlNTa67mLEHN47twg2nzFlzC8k+yNbfxK11lRPw57ZEqpiQsqFh2unqURdqvz5/2w353MY/Vo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784546403; c=relaxed/simple; bh=32yH5seyPLz9/uWwK4zx6biu0R2h3P0Pa5M3dMUbc4M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YtLpVlHzCrdcxTcjdBD3T+6lT0JmzdYNQdqWkd0samOfi2z2AIQ3U4rnRbaZDYczSCi4Di0nltGZWVrsvqEdsMkRGBGWce62+x4fMnqk+8qAcuLS0JENvjSx2IAdGVUcjHNYFOmPcWnfjUcbJqoOTozWUk785tJfKV4DdRARiF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=JF7Jvdoi; arc=none smtp.client-ip=115.124.30.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="JF7Jvdoi" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1784546392; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=b9DJpAd7dJus4uCxgZw4x1NB6kjRhyCZJJkvMlelICQ=; b=JF7JvdoirQcu/oQXl6g8DD5JnLcjQQrEthlqUuWpn0oibzmxg9YlbRrKSZkPvUAfZ9o/hJvULOE/E4+lcxDLVgo9o5JTxqOseFzg+Ii5JNdzmtZDgrnlY62L0xB3dwlOGmEzzVEtiHlT5d3f5xTq6//Nd8c4jdakmduaiTtud0I= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R631e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=ying.huang@linux.alibaba.com;NM=1;PH=DS;RN=46;SR=0;TI=SMTPD_---0X7TBCA6_1784546373; Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0X7TBCA6_1784546373 cluster:ay36) by smtp.aliyun-inc.com; Mon, 20 Jul 2026 19:19:49 +0800 From: "Huang, Ying" To: Shivank Garg Cc: Andrew Morton , David Hildenbrand , Zi Yan , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , "Alistair Popple" , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , "Mike Rapoport" , Suren Baghdasaryan , "Michal Hocko" , Karim Manaouil , Frank van der Linden , Teja Vojjala , Pravin Tamkhane , Kinsey Ho , Wei Xu , Matthew Wilcox , Davidlohr Bueso , Vinod Koul , Bharata B Rao , SeongJae Park , David Rientjes , Xuezheng Chu , "Yiannis Nikolakopoulos" , Dave Hansen , Johannes Weiner , John Hubbard , Peter Xu , Rik van Riel , Shakeel Butt , Tejun Heo , Fan Ni , Jonathan Cameron , Aneesh Kumar K.V , Nathan Lynch , Frank Li , Dan Williams , , , Mike Day Subject: Re: [PATCH RFC v6 3/5] mm/migrate: add copy offload registration infrastructure In-Reply-To: <20260630-shivank-batch-migrate-offload-v6-3-da95d7e8b8a2@amd.com> (Shivank Garg's message of "Tue, 30 Jun 2026 07:28:39 +0000") References: <20260630-shivank-batch-migrate-offload-v6-0-da95d7e8b8a2@amd.com> <20260630-shivank-batch-migrate-offload-v6-3-da95d7e8b8a2@amd.com> Date: Mon, 20 Jul 2026 19:19:31 +0800 Message-ID: <87wlupx60s.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) 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=ascii Shivank Garg writes: [snip] > diff --git a/mm/migrate.c b/mm/migrate.c > index 41b732e78a67..4fed3110ca0a 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -43,6 +43,7 @@ > #include > #include > #include > +#include > > #include > > @@ -51,12 +52,6 @@ > #include "internal.h" > #include "swap.h" > > -/* For now, never offload. Wired up in later patch. */ > -static bool migrate_should_offload(int reason) > -{ > - return false; > -} > - > static const struct movable_operations *offline_movable_ops; > static const struct movable_operations *zsmalloc_movable_ops; > > @@ -2050,7 +2045,7 @@ static int migrate_pages_batch(struct list_head *from, > > /* Batch-copy eligible folios before the move phase */ > if (!list_empty(&unmap_batch)) > - migrate_folios_mc_copy(&dst_batch, &unmap_batch, nr_batch); > + migrate_offload_batch_copy(&dst_batch, &unmap_batch, nr_batch); > > retry = 1; > for (pass = 0; pass < nr_pass && retry; pass++) { Found a difference between v5 and v6 here. In v5, migrate_pages_batch() checks the return value of migrate_offload_batch_copy() and acts accordingly. While in v6, it does not. Why was this changed? IIUC, FOLIO_CONTENT_COPIED is now used to indicate a copy failure. Is this necessary? Is it possible that some (but not all) folios fail to be copied? [snip] --- Best Regards, Huang, Ying