From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 B33C4BE5E for ; Sat, 20 Dec 2025 04:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766203277; cv=none; b=T6ToW8cFGFrw/8vGyQrWytneF9L1KjNuSyJjPKfL8HOS9VKzJya7qTPJMqT+jk8r7j6IF8q4njNKv3WE19Ydm9a0BKzG9GaDEeyLnTIiG/Mr3zDtgejSm/CRGVMhT32IgdNw42RK4o/Cv4sn/ZSpbUdyeQCzJY2t74Dazu/QDUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766203277; c=relaxed/simple; bh=yBsBEZExnr/79M9q663UVpGUcr8Q2kYBidgFbpRe2vE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RAU199JnnW8WChpM1jOVfze7O/Ny6Gxg3Av33Agd7iemBz/3oH4Q/r15AVj3wQiyDjJ4f8FifTIyjcE0IFX7rx6t1q1e/HNn73DUJwiFvHlhW600xY1tVFMwOz9pmymk19JVZJWOzPq4fcpMMUNE0UPDwWbZD1nU5XOjBHJhJUc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VO4+lvjB; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VO4+lvjB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766203274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a0m4ox1XoKOxqK5pNCCILrkroETfrBa5ZoW3DNG7pIY=; b=VO4+lvjBVPAs7npJX29LKsyidq5ZPM6pSo2/JO5cbdkgrZSn7WwTKPHiQwIqohkrq1uWqD b3BHt3xjYE+IY9sGi+59gedHV52MTio23QRBIwtticxSqsMPTsVl6k0Hwimoprul25eSwN GYk7cSLevS9efkXwgk/nVH3wy628nhA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-403-SZ3hLAk3Okqg4NMbLRxL2A-1; Fri, 19 Dec 2025 23:01:10 -0500 X-MC-Unique: SZ3hLAk3Okqg4NMbLRxL2A-1 X-Mimecast-MFC-AGG-ID: SZ3hLAk3Okqg4NMbLRxL2A_1766203268 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6AF171956089; Sat, 20 Dec 2025 04:01:06 +0000 (UTC) Received: from localhost (unknown [10.72.112.41]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9EF0919540DF; Sat, 20 Dec 2025 04:01:02 +0000 (UTC) Date: Sat, 20 Dec 2025 12:00:58 +0800 From: Baoquan He To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , Barry Song , Chris Li , Nhat Pham , Yosry Ahmed , David Hildenbrand , Johannes Weiner , Youngjun Park , Hugh Dickins , Baolin Wang , Ying Huang , Kemeng Shi , Lorenzo Stoakes , "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 11/19] mm, swap: split locked entry duplicating into a standalone helper Message-ID: References: <20251205-swap-table-p2-v4-0-cb7e28a26a40@tencent.com> <20251205-swap-table-p2-v4-11-cb7e28a26a40@tencent.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 On 12/20/25 at 01:26am, Kairui Song wrote: > On Thu, Dec 18, 2025 at 2:37 AM Kairui Song wrote: > > > > On Wed, Dec 17, 2025 at 7:22 PM Baoquan He wrote: > > > > > > On 12/05/25 at 03:29am, Kairui Song wrote: > > > > From: Kairui Song > > > > > > > > No feature change, split the common logic into a stand alone helper to > > > ~~~~~~~~~~~ > > > standalone, typo? > > > > be reused later. > > > > > > In phase 2, I saw the newly added swap_dup_entries() is only called by > > > __swap_duplicate(). The 'reused later' means? > > > > > > > Ah you are right, this patch belongs to phase 3 I think, I can drop it > > for now, it's just a code rearrangement. Thanks! > > Hi Baoquan > > While working on V5 I noticed we do need this patch, the patch "mm, > swap: use swap cache as the swap in synchronize layer" needs this > splitted helper as an intermediate step. That usage will be dropped by > the end of this series but I think we can live with this splitted out > helper. The splitted helper and original help will all be gone in > phase 3, and there is no behavior change at all. That's fine to me, thanks for telling. I have some minor concers in other patches, will add in v5.