Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp71705lqa; Fri, 26 Apr 2024 14:58:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlKhqUAqLZApgYNPebU25FvLLiYB8rdUS6Rr7NgF0XeoeKjnzuDKtLvLFfTfc73/5UI9QCh2QGbGj7Ua4lElTQhZ+1RDihqDKQXOAAhg== X-Google-Smtp-Source: AGHT+IEKyBh/UrGFL9PBl14ThKh43mTFoQNEiUhtKp8Cta18uFOeP3TVdTfGVhGVpO+vRsyLa09E X-Received: by 2002:a17:90a:4083:b0:2a6:280e:3ef7 with SMTP id l3-20020a17090a408300b002a6280e3ef7mr3953822pjg.22.1714168736674; Fri, 26 Apr 2024 14:58:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714168736; cv=pass; d=google.com; s=arc-20160816; b=KuYSGFTqS+L1Vpl98pJF6fT+TeVoReCav3+yRZBG3zmgIV4ak3gCt/gj4yYnKq+qiS BENytYwD+9G9j+KMoT8wyQ/xboWCOxXu5OI02n0Ax2XfDC/GrKnF1l1NJJpyPLAsiuFL fW3lVfaYHbLZz35g5QI7+4yX4whr5PxZkElycPSK8l93IySa/pa2ZNbHH3Q4x+7Sp3kt 92qeHjbz/5FnckZVv3ChqTY/UB7oTUnph+/4isj1tiISrtHsdpRi2X9gxRYcIxGXSgyv fAxDGO4dAnpkJSuBtW98hbc3wXqrwNCiq6hKzyeZ6/mdYvWkxNeEwRPDWWCargPIeLbL SqPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+QCnlzmJ6bjL+5B5nZfc9uwhSIwhhaQo56prOJlaB+0=; fh=xtVoNsaQKrBHGvNpS2Gtkolj/AnZy44hgDsZ41WbBjM=; b=rjEM0yDKU5dCra7qNMBO8qsLy5SSWCv23NhwrcbBhQFfcKYJv7DY8nXMaqWqkT7FWH RtuKo/DGD5rc6ymnuZN00YaF19ri6x1RrK00pIiTL3XdRAUCT/xfRNR44fLSt1rAgCsH qZUEshboJyPSmzoBcKJnBaULqJd77tENbvs1Vms5yrqQqoOGIE8aXxCeUz+hDaGdCs2A UNQjPYcSu+JMituxKR2FwQgcXHmbw6x/6+N1KVFo7eHomRxgcP8JwtfngQTzSN2WtjjL E3g1/dja/XRsx3rkqScwiFpumriS1BEvnmzpxRFKawXezfQj/9o3T0p8hKP4PVYJh2Vw 4qlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XWAxTbik; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-160721-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160721-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h5-20020a17090aa88500b002a557ec4174si17393441pjq.82.2024.04.26.14.58.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 14:58:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160721-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=@redhat.com header.s=mimecast20190719 header.b=XWAxTbik; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-160721-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160721-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 642BCB215E5 for ; Fri, 26 Apr 2024 21:58:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 838F63770C; Fri, 26 Apr 2024 21:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XWAxTbik" 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 3870537163 for ; Fri, 26 Apr 2024 21:58:36 +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=1714168718; cv=none; b=Kln5buGj5HK7W3atES3Wfqsbyd8Pt2Tt3YIwwuMCM5Cq0KteDkNOG65AWT4kvGvni1hSDqsqcxtTCpC+4Rr/7IF5WCe+133l3N9Su+dN7k+knCn2u1nJp1/l0Zlci8MpuFAqo9yFh8Ypzk4C4GbEmXDaxzFOv6vrT/rvFCR70lU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714168718; c=relaxed/simple; bh=GpKDeVd3Be5OZTf7mdPRg/LKaWMV3/RuUFvbHOM6pQ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GCykGKQTvNTrYhgxJ7M/xY0k/+tfvZzf5bQO74/xyoh22kTDRY2WrCrtOIsfOrybVAtvaicUdGS0cz3DLYEi8tNYr34aUlM92HiB8b+0Y3/ptQDYfmAHJvGmUDQlNsWNgCpYZbwhNIc/ZxL0846OENI92dvo+IQl18iycKDZYLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=XWAxTbik; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714168716; 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: in-reply-to:in-reply-to:references:references; bh=+QCnlzmJ6bjL+5B5nZfc9uwhSIwhhaQo56prOJlaB+0=; b=XWAxTbikt02kzcDl1AzK22glPUXZQ+sA9GGmqMSDTagHr8atZPln4XYVTn7LaoRjuqx5u/ eUW7xbfLZOquhE1ngvmJ5tauIYj4+q4KPv494ubsaEq024i3YGyC2swINJTqvSBtQOK8p0 iKfxStbqBXhIKdCJHY6UqORqc5wRCn8= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-347-ztQ1HOfKOM6r2BEY6AJPDA-1; Fri, 26 Apr 2024 17:58:34 -0400 X-MC-Unique: ztQ1HOfKOM6r2BEY6AJPDA-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6a073b075edso2266656d6.0 for ; Fri, 26 Apr 2024 14:58:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714168714; x=1714773514; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+QCnlzmJ6bjL+5B5nZfc9uwhSIwhhaQo56prOJlaB+0=; b=nvLL8B+kPxTF+SBJKNblX/DiPk6s6d6dMw501P/rV328zblVAwBjkmTroAaszn3nML 6aROA1s5DzPPhBraodUXj4IEgeZtwLj9ZrPJMPGfBHImdt4h7zZsAZMluVn46NzMcUBo pqPiGeEUXSyeqBC0qjJxIM8DWfLg5ycR626rgPrx0eht1NWhgRINROnrAvFmWFr1nfKT XhTvsDUGpSoBB2317TxzQA2vYPmRApjn053ZVzKjYYqnnyI9BMDWyquGlqoUdHbiG5OM Zm98VjTTE0f6zMGTX1uFgsEuuNDM1mn47svgADeh8aQAbOBVvWpAwwap7kN6HgfExWay WlZA== X-Gm-Message-State: AOJu0YyLdseghvVNXJsEJnuMOzR/vl0Qb7CIln7obIwnJ6OyeCOND0y4 h5gUFnEIXfBCuMYm97F9rbKo3T0nreQyVDIqYlmuAWD+ng/UmpNU/KhtCF/YrkoKEtN7yYZhugN eWZJ3g2y0WpfwsbIVIieAv1GU927TVDTNv772d1nPrt2YfVGmU1uMotmmdGpwYA== X-Received: by 2002:a05:620a:17a7:b0:790:95ad:9260 with SMTP id ay39-20020a05620a17a700b0079095ad9260mr4428403qkb.0.1714168713791; Fri, 26 Apr 2024 14:58:33 -0700 (PDT) X-Received: by 2002:a05:620a:17a7:b0:790:95ad:9260 with SMTP id ay39-20020a05620a17a700b0079095ad9260mr4428368qkb.0.1714168713163; Fri, 26 Apr 2024 14:58:33 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id g13-20020a05620a218d00b00790789db3cbsm4659252qka.29.2024.04.26.14.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 14:58:32 -0700 (PDT) Date: Fri, 26 Apr 2024 17:58:30 -0400 From: Peter Xu To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Mike Rapoport , Jason Gunthorpe , John Hubbard , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v1 1/3] mm/gup: consistently name GUP-fast functions Message-ID: References: <20240402125516.223131-1-david@redhat.com> <20240402125516.223131-2-david@redhat.com> <8b42a24d-caf0-46ef-9e15-0f88d47d2f21@redhat.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 In-Reply-To: On Fri, Apr 26, 2024 at 11:33:08PM +0200, David Hildenbrand wrote: > I raised this topic in the past, and IMHO we either (a) never should have > added COW support; or (b) added COW support by using ordinary anonymous > memory (hey, partial mappings of hugetlb pages! ;) ). > > After all, COW is an optimization to speed up fork and defer copying. It > relies on memory overcommit, but that doesn't really apply to hugetlb, so we > fake it ... Good summary. > > One easy ABI break I had in mind was to simply *not* allow COW-sharing of > anon hugetlb folios; for example, simply don't copy the page into the child. > Chances are there are not really a lot of child processes that would fail > ... but likely we would break *something*. So there is no easy way out :( Right, not easy. The thing is this is one spot out of many of the specialties, it also may or may not be worthwhile to have dedicated time while nobody yet has a problem with it. It might be easier to start with v2, even though that's also hard to nail everything properly - the challenge can come from different angles. Thanks for the sharings, helpful. I'll go ahead with the Power fix on hugepd putting this aside. I hope that before the end of this year, whatever I'll fix can go away, by removing hugepd completely from Linux. For now that may or may not be as smooth, so we'd better still fix it. -- Peter Xu