Received: by 2002:a05:7412:a9a3:b0:f9:93eb:408e with SMTP id o35csp34210rdh; Wed, 20 Dec 2023 21:47:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIi97Wv/FfnCfc+ET/NLrZo+jNVsYMkcfBxJGGt83MBORkVqrfF+LUypPQINIaGGiJCcsf X-Received: by 2002:a92:c248:0:b0:35f:c40f:9992 with SMTP id k8-20020a92c248000000b0035fc40f9992mr3969344ilo.107.1703137678484; Wed, 20 Dec 2023 21:47:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703137678; cv=none; d=google.com; s=arc-20160816; b=BMRzozh5DcmZS+be0Z8MgPCoj50miVchygtdxo1KzyH2d0BKEKvmv0MEtve4IUjZRt AVU2FCgKWJYdMD+TC711ZWnVmY1OMQoL05vtBZZMYmeqhFy+lwvFeBskVqKGLUd6N0NX VU10/MkG6Ytnfg6Ju5ndnyAOZwkDbinv9d1F2pZFBbOJ5en9m37A2VtGgOL/5RvnffS0 LtyX71odz+eo2RA8401gSDrTW+IqpTm90AeSmm5jgrVXhtQjkGRO0NGt0DSqCtl0E2Jd tQnEE+PvS7h8SeuuO6Bce5kW9BrGpW919kPMG+LiAoEhheI6FdCL65HD846b4Ry9uNJu OygA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=aoopr+ccNsQyXfz/YUalVeZvDB+jSnnz+aOkdBpWeU0=; fh=hi0K2Jnr4RT+PiOLlZYfIpX5x9s8h1JQMx3oMnKF2mo=; b=qs8f8emWc4Vdueg+uDHmYQjL1jANIlolf7+KsWXhOnzOK/EHg34Dp2x+sxjyVZXlCa +7ovOi0kwH1Yljco4rc3+4mkF4aR8pWFlbgZjxxPbuSDSAXRL4igPq+WUemwlUh4e6cz hE24bpQklWAekbKNtz1jYBA17sCQEv0A36orFxnwwPunl5bFaJls1M9Zo18gaoQO1aaw 2gRBWesZ10dYF+U6skk1IttDN82dU3g8i04ObrQHAGtTA0CcvnF4jWBMEkSedg7dalWi d9DCH8TNC6xtZp5GFB+L1xN8+cKW4b/w685xWHocIiMbHM+1v2cp49qOG3JeZmIpvepD azGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=V1Sdgytx; spf=pass (google.com: domain of linux-kernel+bounces-7870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 11-20020a63104b000000b005c61d17e6aasi981249pgq.122.2023.12.20.21.47.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 21:47:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=V1Sdgytx; spf=pass (google.com: domain of linux-kernel+bounces-7870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D9AC1B21279 for ; Thu, 21 Dec 2023 05:47:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09184BA57; Thu, 21 Dec 2023 05:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V1Sdgytx" X-Original-To: linux-kernel@vger.kernel.org Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 94CCABA30 for ; Thu, 21 Dec 2023 05:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703137659; 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=aoopr+ccNsQyXfz/YUalVeZvDB+jSnnz+aOkdBpWeU0=; b=V1Sdgytx1Nwd2uNmlTnQaQ+xhip20uNc/DB/VFV6TjM1CbAernGsYjcKqpbioQHmELDDvz vWexG8icTH1CE/sFCW1/irRY6i/mDg/oa7Pz/wz9L3LL2roWytU5ZslpeYJlI2mMh+Iqcr uuI5N17JNexTHXbTozmaub+p5p7jPoo= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: Re: [PATCH v2 04/40] mm/rmap: introduce and use hugetlb_try_dup_anon_rmap() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20231220224504.646757-5-david@redhat.com> Date: Thu, 21 Dec 2023 13:47:01 +0800 Cc: LKML , Linux-MM , Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Ryan Roberts , Yin Fengwei , Mike Kravetz , Peter Xu Content-Transfer-Encoding: 7bit Message-Id: <7A77CCE2-92F1-47D5-BCCC-C520210ED3EF@linux.dev> References: <20231220224504.646757-1-david@redhat.com> <20231220224504.646757-5-david@redhat.com> To: David Hildenbrand X-Migadu-Flow: FLOW_OUT > On Dec 21, 2023, at 06:44, David Hildenbrand wrote: > > hugetlb rmap handling differs quite a lot from "ordinary" rmap code. > For example, hugetlb currently only supports entire mappings, and treats > any mapping as mapped using a single "logical PTE". Let's move it out > of the way so we can overhaul our "ordinary" rmap. > implementation/interface. > > So let's introduce and use hugetlb_try_dup_anon_rmap() to make all > hugetlb handling use dedicated hugetlb_* rmap functions. > > Add sanity checks that we end up with the right folios in the right > functions. > > Note that is_device_private_page() does not apply to hugetlb. > > Reviewed-by: Yin Fengwei > Reviewed-by: Ryan Roberts > Signed-off-by: David Hildenbrand Reviewed-by: Muchun Song Thanks.