From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6495C19F4F for ; Fri, 26 Apr 2024 21:58:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36C956B0083; Fri, 26 Apr 2024 17:58:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 31BFB6B0088; Fri, 26 Apr 2024 17:58:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E4406B0089; Fri, 26 Apr 2024 17:58:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0009B6B0083 for ; Fri, 26 Apr 2024 17:58:39 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A5712120431 for ; Fri, 26 Apr 2024 21:58:39 +0000 (UTC) X-FDA: 82053047958.12.CDB0300 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 8870B40013 for ; Fri, 26 Apr 2024 21:58:37 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=XWAxTbik; spf=pass (imf27.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714168717; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+QCnlzmJ6bjL+5B5nZfc9uwhSIwhhaQo56prOJlaB+0=; b=y3AX0849mCWZAjLIirqw45ySmqqUfeAaBvf5RmdlTL4IXua1sBUYQ6ys6+SrGiY7XMwFvd ZXk1ga9p7oy03+4aLGGEwEbQp+k7pPr0jLVusTg9/+0H7cbLFCDdDOA9IdfGEaXV+/V9lP fnbBmZpsEY948uz7NYBvl6XOCHQkYVg= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=XWAxTbik; spf=pass (imf27.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714168717; a=rsa-sha256; cv=none; b=ye/fqKNOz9pJeRdOaPuuA9o/+ERQMg0WTvKIW6eWt+EtIxSz+EIwZxTNiVIz5J0D1lXyS6 IEuGxWd9wWXSqq218Yn33torMoVp6ulI6dI3AWDhNkGz51vHAkAhnxMu+05a4MihzpO+uX BL9nQCFCcRQ4COrz4e6FnQ2SCRMZ81c= 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-320-YqUYFKD3MR6en_yiq--b3w-1; Fri, 26 Apr 2024 17:58:34 -0400 X-MC-Unique: YqUYFKD3MR6en_yiq--b3w-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6a09e3be98dso5539416d6.2 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=RFVJmf2J9g8//DsOO/XXIQzKY7qUAamB3lW5soGtJcsisy5rEXfFlwQBm1OaepmvMx /M5dH12ccSbBq47qpxlcqR3GLDwH6dDcs2RNcuW/rY4euZinIKzZro77zFMvGNAzJ3Ud 8y4G7qaxMT8/X8BP4TPlBSMSXOl2kCaYlx/sWxVpG3otFf0GPc9GTTtqcECSNjwn8Xdr 3uorBVgE7QOr1RTiMxwNOLFqkMfdZwh/wGVlCnQyyeW0lPY75FfCUkvHJCMU9+domoO2 H0GHd3yeUBLjwOWRuht8hcIFWuik0XkY68Sh7tDzgOK1Wa3jWKTwTTyc1QA1ws1mLvZ9 bpiw== X-Forwarded-Encrypted: i=1; AJvYcCV6ngN2R/msSXzLhBF4X6vCOptqhFWUQRLeu4NX3Aw5OtAmVZPA8mcI8tE5CaN1QvqsrLhxMjSXaFi20BXTbL41KFI= X-Gm-Message-State: AOJu0Yw58LUyMkoG6rKmmjOdWf6ZZefE4QBYU+QvMq1e4cY/FSdekHr4 PcDThgOWagt6v9NOa5ULgbhjW7j+qOykVG9ehKQPwu3bK9JAOChnKUwtR+U2qGD4gzzI9iTyFNp nTGXp/bppvOFKXdyhhCxpbIEEJgHwv6iFqAYARoHQ7WLPlXcZ X-Received: by 2002:a05:620a:17a7:b0:790:95ad:9260 with SMTP id ay39-20020a05620a17a700b0079095ad9260mr4428401qkb.0.1714168713783; Fri, 26 Apr 2024 14:58:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9TXpTvynaKbMe+uWh4XQxgfNR94gVb6jB/4BIiWgOtfhaqFyr6WLW6qYoOzAm6Sij+K5ZPQ== 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> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspam-User: X-Rspamd-Queue-Id: 8870B40013 X-Rspamd-Server: rspam06 X-Stat-Sign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z9m2QbHPb56YNTC/hUcWijHThhQ1BONXa+6zctJicqm6JX3sK0mQeTOy8OGaK7jEd/Va6BEmFCpn6j5fU7D8rkND49Ugu1NySDDyPKDcBqUVsfi5dxmdnyw1HdBs+jYNgDYH6kJhOjce0ECKH5utPE/eNygm3DmrK/h0jzpdsDH3TO2JHj31kt83qbUUMndMiopodS6EVVaXEJwYluiV9eblz3ilRyHL2yVgIWqC38yzxYPvc+8tp4oThg6hqzTxN6SXnBESecNSsDXMkpdYDdMDl2m//ufjpjF8U2sPK15PkyVubTiSa5sco13MR0T8jmWoD9uux5BZR0XQLGSu2lKsZ8cgNgA1fQ1qhP+QBmOG6tFPXDZoA11QNNlmiHsi4vg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000025, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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