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 3A0F5C001DE for ; Fri, 28 Jul 2023 21:49:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 63F678D0001; Fri, 28 Jul 2023 17:49:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EEE66B0074; Fri, 28 Jul 2023 17:49:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B68B8D0001; Fri, 28 Jul 2023 17:49:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3BC366B0071 for ; Fri, 28 Jul 2023 17:49:21 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 06150A041F for ; Fri, 28 Jul 2023 21:49:21 +0000 (UTC) X-FDA: 81062362122.20.66B23C9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf29.hostedemail.com (Postfix) with ESMTP id EB07B120024 for ; Fri, 28 Jul 2023 21:49:18 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WKjeCM2T; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690580959; 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=X2WhoRj0lwDKacxOziWBDjdJtIWuF0uoNKyCx6NeZN8=; b=2xCpE/RK24GIWrchQoO1S89HqnqFno9oPoCzfxQFUHpel0aILoX0NWE2/cZA+1lTViX+Xo ufUI2kKHPKUPl3x3LUdsSj/KsE01SOJ6lF7tv4qwZFx02JYJweyIMPQF0kcHmjaHHQSZBD K4ijy2s6nbfhAo0whe5RxHaFxi/b8Gw= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WKjeCM2T; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690580959; a=rsa-sha256; cv=none; b=bg0xdZyCwGHb7xNo+wK76dXrJCewkFXZ+gvWc84cbySNv21uu/hMOZ3sjJbKd0lBMyMAGT 78YIVvs8UX/kdYGMNwnyYgb7c0ldFKIZKbdtCp1CTVekF0Yz9cMrmaYJlJSLVCLoCG5cQ4 KJfG1exRz0XTFmSIhd5YxSlS6UtaWxY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690580958; 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=X2WhoRj0lwDKacxOziWBDjdJtIWuF0uoNKyCx6NeZN8=; b=WKjeCM2T0iPHoUrWgKRg5i1rqwtD2kKhdMR67flpwh0gjBucbhqBQfpOEwQRT7VLonVvS3 9wrg3+u1k9pql86fvuQ9AMVPzM+j4q/areFd5nV59iyay+HDyDOmlX/Rot1+rOBIKqo9p5 rsvE+fWQNNOvTYeQ31TaVF+dN/PXVgU= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-117-06SC6zvJOTiIxVMWj9wmPQ-1; Fri, 28 Jul 2023 17:49:17 -0400 X-MC-Unique: 06SC6zvJOTiIxVMWj9wmPQ-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-40559875dd1so4809131cf.1 for ; Fri, 28 Jul 2023 14:49:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580956; x=1691185756; 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=X2WhoRj0lwDKacxOziWBDjdJtIWuF0uoNKyCx6NeZN8=; b=fogj9WvnNA3WGpVXNKhvmSlqVjWZj0nn7JN5LxDEqFUGEbE0R4RQNE4RhUEZFdz+Ka LHRVPiex2uC+XkWswCZeq57KSWwruNMwkVX246/XgsavA7JVgj4FUdLj6mKg2KVbi2+1 x9u6OjxeOSpO3FVoIycbHEKYZc6zC+xc5HQwmj8WsNv1IxPbbXWt201M8kBQ2VHrzmpi OPBICMCO1aNwY9tfwNVqCA4/GXklc3PVbDVur6jPBcJFVruN8EZDRV6btIjvqXTYY4gh u5jip9/t/RWU3yf4xgCLxkwLdV/Qow1oibgNxgXpu0EQNif9vqQU6swonSEuWYNd9IpU YazA== X-Gm-Message-State: ABy/qLaULfHbUp0Xdqxu9FABV6annMf1wbuVSgJQjNLFqnQvls8XPeCI PLbTBT2kVYjKiKzj9Fl6IyhGOGWazibr/9x0XW/zRXrSFUGMtGqLGiMTayYc64R5/wv3OjDRiUF qpbA6qGCIs/o= X-Received: by 2002:a05:622a:1812:b0:400:84a9:a09c with SMTP id t18-20020a05622a181200b0040084a9a09cmr783859qtc.6.1690580956614; Fri, 28 Jul 2023 14:49:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlEaWEQIKUPtxNLTWiu81nfTINj9tcUnW2EDUXzsCXYaLoFD6amWo5AwOsZTUNB+K0vv0WXo5w== X-Received: by 2002:a05:622a:1812:b0:400:84a9:a09c with SMTP id t18-20020a05622a181200b0040084a9a09cmr783836qtc.6.1690580956269; Fri, 28 Jul 2023 14:49:16 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id u18-20020a05622a14d200b003f3937c16c4sm1457623qtx.5.2023.07.28.14.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:49:15 -0700 (PDT) Date: Fri, 28 Jul 2023 17:49:13 -0400 From: Peter Xu To: John Hubbard Cc: David Hildenbrand , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Andrew Morton , liubo , Matthew Wilcox , Hugh Dickins , Jason Gunthorpe Subject: Re: [PATCH v1 0/4] smaps / mm/gup: fix gup_can_follow_protnone fallout Message-ID: References: <20230727212845.135673-1-david@redhat.com> <69a5f457-63b6-2d4f-e5c0-4b3de1e6c9f1@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-Rspamd-Queue-Id: EB07B120024 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: wkmfywqrbqotys3f7c1hhqww4fa3m3dg X-HE-Tag: 1690580958-778187 X-HE-Meta: U2FsdGVkX18Q8O1yaISLMfd4t/I0F9gsCYWFgzuEj4hkF5RrSOdM3kmydEW1lNd3XX08+NDqQ/duX5+6AEEbctqLeb8+4xdQt7Cfqd6owxEio8RB9MFdHlzVDspNMCkEr638mKn/sDpZiF+w7FC4fhrTtps5qgvIBOEbgIGPHzfIaXi0EaGZXXwt7c2Hry/05rTf7x5OEv5IPnb/QV4idwkiJV8gChm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AKfzVto42foDHVr7SMBnBTB6zFBw+c0677ib1x1tOHwKMTTNL45K+N+lOzd/jIhE+NnxvAVfs+bzG5ulS0+0nHRrFa/85zDb X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, John, On Fri, Jul 28, 2023 at 02:32:12PM -0700, John Hubbard wrote: > On 7/28/23 14:20, Peter Xu wrote: > > On Fri, Jul 28, 2023 at 11:02:46PM +0200, David Hildenbrand wrote: > > > Can we get a simple revert in first (without that FOLL_FORCE special casing > > > and ideally with a better name) to handle stable backports, and I'll > > > follow-up with more documentation and letting GUP callers pass in that flag > > > instead? > > > > > > That would help a lot. Then we also have more time to let that "move it to > > > GUP callers" mature a bit in -next, to see if we find any surprises? > > > > As I raised my concern over the other thread, I still worry numa users can > > be affected by this change. After all, numa isn't so uncommon to me, at > > least fedora / rhel as CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y. I highly > > suspect that's also true to major distros. Meanwhile all kernel modules > > use gup.. > > > > I'd say we can go ahead and try if we want, but I really don't know why > > that helps in any form to move it to the callers.. with the risk of > > breaking someone. > > It's worth the trouble, in order to clear up this historical mess. It's > helping *future* callers of the API, and future maintenance efforts. Yes > there is some risk, but it seems very manageable. > > The story of how FOLL_NUMA and FOLL_FORCE became entangled was enlightening, > by the way, and now that I've read it I don't want to go back. :) Yeah I fully agree we should hopefully remove the NUMA / FORCE tangling.. even if we want to revert back to the FOLL_NUMA flag we may want to not revive that specific part. I had a feeling that we're all on the same page there. It's more about the further step to make FOLL_NUMA opt-in for GUP. Thanks, -- Peter Xu