Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1805492rwb; Fri, 28 Jul 2023 15:36:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFu7iLsuFQd3B8Hlbc9P3OPJzKFzPeoH64kBOSKTzNpHiFY7LG4aGA0a9OsDbFEfy9SXvjl X-Received: by 2002:a05:6a00:399c:b0:65a:710a:7855 with SMTP id fi28-20020a056a00399c00b0065a710a7855mr3232926pfb.26.1690583817237; Fri, 28 Jul 2023 15:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690583817; cv=none; d=google.com; s=arc-20160816; b=jpaCTeDaT0gOH8D5QLNqimfREW4Ok7bZqsun4pZc1u0aUjEfEBVeITwT8Ixp+4m5mI QaobNTnmQ/UymA9svLBfjrqEcfglu1GprWeGbdOd5lZ1c36q6K89k6G7+0ULQ3flTLyS kpw7B8thNEA/T58HoKHuSr7PCreXDl6z6o9oMie4YwxVo3SdO1oJOksnYBRrqQ4331lD PKVV2lfjTHiR/hFebzv4PV4HNOwUiaGQ8IxIfJRqnkLsfCDlzroXFJPrtGnKgTTmbSdO gZIkAOm2ILWzrcFNxm+wT6jfnJEdSQ+To2vX608s56eysVD21iwcLOyTR4W6cSTzqJdM AbKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ac7QCjU27us9pWCzIU7wIhVCfe0T3FQhf/CkOGsKAAQ=; fh=RYaUMDI4vwIdtAgKWzoeejgOD56KraaNXDwSkFwwYUo=; b=ziMjBYBwMwXNM2WeVCrYH4+hJulW0XIwkpbu5MHknK5DtelkjzFzOfjMFPDol6Zo/d Fuh2G/Y9W1L49pvltgikpJrhO+FXzO3Fu5HWXAnWGDZaWHpuVt6psdj1dQeiJiFbBTTV D9XJg37HfKI3/0dNIsfgS7tC4c7Dylzc0Ylk96zr1GdEChHzlSd7tLBR9ONB9kS1ghAa z+9Bn1Lv8VP0VGGCM9hh0XklFNCZnXk3A0KnD6dS7NsV3zs685nz5TihO8Zgo5HLUikR cwcYYEaAUzGV4sE2f4kABe80EE5lnzV785O3Chzakhj+iIpsHAVFBVOXzwz38N+J0Tse SWqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LYhSe/6O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fa9-20020a056a002d0900b006870c1ea846si1961782pfb.281.2023.07.28.15.36.44; Fri, 28 Jul 2023 15:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LYhSe/6O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234350AbjG1VWQ (ORCPT + 99 others); Fri, 28 Jul 2023 17:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231993AbjG1VWF (ORCPT ); Fri, 28 Jul 2023 17:22:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE0ED44B1 for ; Fri, 28 Jul 2023 14:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690579270; 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=ac7QCjU27us9pWCzIU7wIhVCfe0T3FQhf/CkOGsKAAQ=; b=LYhSe/6OtEFll5aplWdy4d8CrHxzCAQ8zW2bCaN7e3SauRBnQ7L5ETkDUEGg1tBAJy8OGM Rde9tAHap2nU/doxLLjyPZAyxbineQooQNttMMSc6jJ9r5SeJJuTA3NXk385ozQ50OOLZc FxcsIDYdl9O6/fRL2IzmAzWvflSvksI= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-261-05H7r-28PnSRsyvM8gsyhg-1; Fri, 28 Jul 2023 17:21:08 -0400 X-MC-Unique: 05H7r-28PnSRsyvM8gsyhg-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-63d05a56b4dso5500666d6.0 for ; Fri, 28 Jul 2023 14:21:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690579268; x=1691184068; 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=ac7QCjU27us9pWCzIU7wIhVCfe0T3FQhf/CkOGsKAAQ=; b=g+CSBWb7odeNnKRPAfTOgtEjnKdz1MZ2GADual7tib1tKO9pDLf4pZTXQ24fS+9yQT N6s1xkZKrBlhnBkRjdDtyUwk3XiDOLuNxMtx0k0WCavz57OrLxo3VhwBdDFo+LiswXTp lyHv56VYwTLhZvIP4IDUL70KccFwQqBoVDiyT9DBv87mLNTAs+HHP48SujLU8pFRzSd8 GIrOseV2GZI+PtxjpQyIf6O3JEbZr5VJv6PYQbhGcoJlHHNoXOSH7rT7wFalJcHoBND2 Zb9CKeHfWF+nMoZmPQuJ5ffjHwdr05TsXMptQToWbGkgDv4aTm5SZb1WBp7NbYvSTmBZ 31hw== X-Gm-Message-State: ABy/qLZHnHiz1z5j9MAKe9vsRfqsi1fUYIGTpgrin/yutEelOflujIGV +f+tqxDf0bm1EIPPC5HGP3L1dqRym1pa2rO6YqCHq7XiAHqn/RtSjXmdycFyqSR7ZAMU3lMUygB 9WLS8JUFdw3hf2RWHdtqS+79o X-Received: by 2002:a05:6214:5190:b0:635:fa38:5216 with SMTP id kl16-20020a056214519000b00635fa385216mr571669qvb.0.1690579268035; Fri, 28 Jul 2023 14:21:08 -0700 (PDT) X-Received: by 2002:a05:6214:5190:b0:635:fa38:5216 with SMTP id kl16-20020a056214519000b00635fa385216mr571651qvb.0.1690579267641; Fri, 28 Jul 2023 14:21:07 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id h13-20020a0cab0d000000b00635eeb8a4fcsm1538086qvb.114.2023.07.28.14.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:21:07 -0700 (PDT) Date: Fri, 28 Jul 2023 17:20:55 -0400 From: Peter Xu To: David Hildenbrand Cc: 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 , John Hubbard 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <69a5f457-63b6-2d4f-e5c0-4b3de1e6c9f1@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Logically it should also be always better to migrate earlier than later, not only because the page will be local earlier, but also per I discussed also in the other thread (that the gup can hold a ref to the page, and it could potentially stop numa balancing to succeed later). Thanks, -- Peter Xu