From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (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 DB1D341167C for ; Mon, 3 Aug 2026 15:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785769424; cv=none; b=D1/HAwYMi+S5mjP6vlX4Kb81ydps1Fd/YpclfDR9p9TqBASul2sDsakiCq28+UmGQ99bwt967BcolVYBG6nVPxVykvBTebIRTZ5/P0tqDzppZoJ8nndJEC0O8mGge9ew27vNa5Erp38hSfZY+5glmw9OCQGCNJ2tWdSN05uX1m8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785769424; c=relaxed/simple; bh=xpuun2FpwKl9xPy2b0ojl3YaE6k3z96AypSR1+LJ1mM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=e5w3PursMrkp31KTM/Nks0VCX0VRG7ir7kklUDaAt9EtFGfpdqNoDixmtN0brbpAtUcOwOOdMk/tfWsQwiFKMhnSGeoyM4JRMihjVKq9uNHxDTlVtJDmTKyWMoFwXBc//QmuYAGDhepbaF9H6SSROOvdTgsQnHVCFhfPOp0tV6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NwgDxCAO; arc=none smtp.client-ip=209.85.210.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NwgDxCAO" Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-84e048a801dso5245947b3a.3 for ; Mon, 03 Aug 2026 08:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1785769422; x=1786374222; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kpmlhPaZ29dFNT38yqO3kihwGUlr59oo46zK4tKVuxM=; b=NwgDxCAOP/Xtj8kYIjHtm6DbddQCtB92rxY3XZFV546upM9mp6NbsBf/OhR0+ElIny F+2Zt9cfHVO5hVNYxXdXfA53A3ZkIr+BBjkSbBSt1dfLuLhXm9JsOiOpGGhbypYcS1nU gxf6DtDemW0fLSSRPCtYHtFRbViRbT/DJ/tWusGe1eeILGOqWrmbe3aGO4Ri+pnd7O/N TiNu3TUQZP78ygRPv3CkdOYfJ4URivnbfsPBpsUHbYoquTwi6AyQV13iBlUcFnCqykcN 6m5IfnXtHqnJgo9UZnFH3MFMAavHS+RUUeCzSCjV7fY/qurLk3V/Vo+L4UE2gOTGBfqu 5FHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785769422; x=1786374222; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kpmlhPaZ29dFNT38yqO3kihwGUlr59oo46zK4tKVuxM=; b=oGR/3RgjrICMOKstNVQQ0Ll926bZRqCkBMFAhFYreYR4uQbgJGNyfbgY51VOjXI5Ev 2g+sSbuhjl3B82TPOLEB03wo/8cm0bN/SnlziV3Em2Lv00b0S0pbFeashOn68J/6MuRi B1ZH3ILCRtrWPvPwlaYKStaS+xtuxdH1MIS2+n7Q68f2+EC1ZT/fAP2rVVAK0BoKcM+Y oydPv0jnhh7y6j7h/LmZPnV3iUqHrb5yhYM0z75wVKF3c6kh05Yk3WTUFtOi+4IiBuR6 1J0lCp44DDvHJNH4ZUBA4QmrXw5m6qsxpxJEybuOtOENaN1ahDiI7766izBJK0lr2kLe Ujhw== X-Forwarded-Encrypted: i=1; AHgh+RoVDLOZPy7uyoJ0aGLmaB4PcWln06XAMX9Jjgafz4drkBKOk0Ucv3Z2Pqw9rdyJiEVKg+IbhgUk/7S9wP6yMEM=@vger.kernel.org X-Gm-Message-State: AOJu0Yw59VgWo/qbY5HmCxQAp/IuOGnexXj0JqVlRiYVO7iLgtX3tm+y KyLoH9iGG3xwSlw/pdZ0hjfQrCWmMqzF+EIyVKYRK5tNcDBNp3UpnnH5HmUS40esL4g0iS/IhD4 uI2IwEg== X-Received: from pfbki10.prod.google.com ([2002:a05:6a00:948a:b0:847:7765:a4c3]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:1f08:b0:84e:d51d:86c9 with SMTP id d2e1a72fcca58-84ee490ac84mr9200662b3a.44.1785769421725; Mon, 03 Aug 2026 08:03:41 -0700 (PDT) Date: Mon, 3 Aug 2026 08:03:41 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260728-gmem-inplace-conversion-v9-0-35f9aec2aed2@google.com> <20260728-gmem-inplace-conversion-v9-14-35f9aec2aed2@google.com> <4460e252-b6de-4df3-bea8-0368a9d0f4ff@kernel.org> <60552bee-3326-4917-b00f-5fb7ba3b8adb@kernel.org> Message-ID: Subject: Re: [PATCH v9 14/41] mm: swap: Introduce lru_add_drain_progressive() From: Sean Christopherson To: "David Hildenbrand (Arm)" Cc: Ackerley Tng , aik@amd.com, andrew.jones@linux.dev, binbin.wu@linux.intel.com, brauner@kernel.org, chao.p.peng@linux.intel.com, jmattson@google.com, jthoughton@google.com, michael.roth@amd.com, oupton@kernel.org, pankaj.gupta@amd.com, qperret@google.com, rick.p.edgecombe@intel.com, rientjes@google.com, shivankg@amd.com, steven.price@arm.com, tabba@google.com, willy@infradead.org, wyihan@google.com, yan.y.zhao@intel.com, forkloop@google.com, pratyush@kernel.org, suzuki.poulose@arm.com, aneesh.kumar@kernel.org, liam@infradead.org, Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Jonathan Corbet , Shuah Khan , Shuah Khan , Vishal Annapurve , Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Youngjun Park , Qi Zheng , Shakeel Butt , Kiryl Shutsemau , Baoquan He , Jason Gunthorpe , John Hubbard , Peter Xu , Vlastimil Babka , "hughd@google.com" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev Content-Type: text/plain; charset="us-ascii" On Fri, Jul 31, 2026, David Hildenbrand (Arm) wrote: > I sent a fix for the GUP code that always makes us drain right now: > > https://lore.kernel.org/r/20260731-check_and_migrate_movable_folios-v1-1-e0002d7b791e@kernel.org > > Would the following (agains mm-unstable + fix) work for you? > > > I assume that you'd have to call it as > > lru_cache_drain_for_folio(folio, 0, NULL); > > But maybe there are indeed extra references that are not reflected in > folio_expected_ref_count() that you would have to consider? I doubt it, but please check if > there would be a problem. > > There is a small problem for merging: > > (1) The patch depends on the fix. > > (2) mm/swap.c was moved to mm/folio.c in the mm tree. > > We could write what I have below against Linus' tree and have the conflict be > resolved when merging. Topic branches are unfortunately not yet a thing in MM > land. Are you expecting the aforementioned fix to land in 7.2, 7.3, or 7.4? If it's 7.2 or 7.3, then I would strongly prefer to base v10 on linux-next (where the fix will presumably land soonish), and target 7.4 for in-place conversion. Then v10 can be applied against an early 7.3-rcN and we don't need to juggle branches (assuming Andrew is ok taking the proposed patch through the KVM tree). Irrespective of this small mm issue, it's getting a bit too late in the 7.3 cycle to land the in-place series, and we need to address Xiaoyao's comments, i.e. v10 is going to be necessary no matter what.