Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp59369rwo; Tue, 1 Aug 2023 12:55:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLWfYDqttt/41rrHgDupXPN7VsdeYKchbbp5D7B+RVmioKXpYOPr+L7bkVTbHDHIwW6KpL X-Received: by 2002:a05:6a21:7807:b0:134:149e:7b74 with SMTP id be7-20020a056a21780700b00134149e7b74mr10999240pzc.61.1690919709503; Tue, 01 Aug 2023 12:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690919709; cv=none; d=google.com; s=arc-20160816; b=ejKFQyiEaWVFiW0Z4nw5bnMQk5hnlP9yVLj56CyZOxYjsl5SR7Qjc7Pvb98sA3SD/m RA/e/9M9u9ndmYn4gnIEVt3UYFIzBWzvPODG4JfN4fjDN8JhPafuKtAy4bVmyATjPOaW dY2m2RkNzeKoYZndIiazuBODhsCXeRYas7GzZTUTrf5J1MsvhHz8Y7uleiNO8jGUpcwU T7paaixyjwMt5Tqtaa0IItid+zhvemVjkkISD/UCnDvGbex7Cd8vReNsmVwp7VcK7TTG CZWf+I6g6It0/Sn9gTGw5V9szVgjswdHkxEU2gImag3AiFE9zsTx7Nsda2BtmvwEp3da qFjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=1l/TRXWCo6q5BSenRhC8N4s4Tp9EqB26+z+WAcvOc7U=; fh=p+UbY4PSzee0ZshTYx5El3UJTApwokEhxUi98kG1zmY=; b=ggFEDi1eZnYkzeFLQBSfufuitBGGlGpzMYShdL9KQI6hbKGZjj4cpatZQQ/vPJdRzu 9ApPTCtik7/Gt2aqMhrO7TqccDtSeM4JpdWeJso7iFPNmwGF2+Z6wKPt6TlQ4BLcCVPa +2RRYRJ1vcu+fdY1jZgwgW1POWAuKFWZyul58WzSm6XMe9lzex3DUpNzM4pm261iWBhL kKAUWoq82RvC+Pbx2Fd2XBRwMtdo9/rYeUB1a9Edkth8E4KVzjQiq2j+9Qlg7FQS6oXo Nz4q8up0w24r03m6KNLEroiaFt8IJShg5O8hPP/gvA2RFOFCK1jy+X3X+6mpnXMR8Z1f 702g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EHC0cy1N; 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 m66-20020a632645000000b0055c95ab2367si9319041pgm.247.2023.08.01.12.54.56; Tue, 01 Aug 2023 12:55:09 -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=EHC0cy1N; 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 S233187AbjHARLa (ORCPT + 99 others); Tue, 1 Aug 2023 13:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234451AbjHARLY (ORCPT ); Tue, 1 Aug 2023 13:11:24 -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 5BC6A2737 for ; Tue, 1 Aug 2023 10:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690909800; 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=1l/TRXWCo6q5BSenRhC8N4s4Tp9EqB26+z+WAcvOc7U=; b=EHC0cy1NGM8LvfN+M805RlRYXXZdK0COGgZvs/Tzpw9PQf2GPfFj6SacQxOTdElZxc1om7 1HLQOJaAOrxN9nkF12P/WPKBFAgfgpiyC95nwm/o1Ur+HgitlRnj/5jt7f133Qm9Bo01GP UeKsqq4yGpYuyVCKMg5sAudA25pjzWg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-TW5lhrtYPMW_z5iFEvd5pw-1; Tue, 01 Aug 2023 13:09:58 -0400 X-MC-Unique: TW5lhrtYPMW_z5iFEvd5pw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fe1aa39febso20258685e9.1 for ; Tue, 01 Aug 2023 10:09:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690909797; x=1691514597; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1l/TRXWCo6q5BSenRhC8N4s4Tp9EqB26+z+WAcvOc7U=; b=ehuEh2s0WT8MPAN97GNmprXvI0fobl5MS7QpfGC87DL1esJ3/PZdjTDrEJsCAZdyTT LK0AgKLmEZLFc0NRovYuGAYSGlvAgfQXQW89npzYFvc6cJP7DLJeNLK26JsYJapiEQNk INLTt/11x3wlCTNPOL0HwlinWYUXKM9LrQH0ghvbXBNMXGGPlRaGmhNr0vJSUNm8Ijzr 3JCKckUM2wgzigjXnr+ritBQLdA8JpjUI8YmBBBPQHGG/c7N0wLRQy//cZEIwxbiRrmt MJvol8zbirMa3NALC1Napkw2Osj0l8LXVwZJtBIA0CBuaYoRtGrmlgkzYbX/wM+dx77q a3cg== X-Gm-Message-State: ABy/qLYS6x5grTbt4ygM1e/leBhwImjQrCDBNu+KnCrxlO0WTo1iOG2N XADdBUCBUBtUqa8rHltjeSAM8na2vCrWTsnlLF1lhHxJzi9c3znz5YdHTjOOIMtmSkA3hXWNwn8 l+7b+Cy+rUL3IkOvgonobmy7h X-Received: by 2002:a7b:cc9a:0:b0:3fc:e1:24b5 with SMTP id p26-20020a7bcc9a000000b003fc00e124b5mr2894748wma.23.1690909797588; Tue, 01 Aug 2023 10:09:57 -0700 (PDT) X-Received: by 2002:a7b:cc9a:0:b0:3fc:e1:24b5 with SMTP id p26-20020a7bcc9a000000b003fc00e124b5mr2894727wma.23.1690909797209; Tue, 01 Aug 2023 10:09:57 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:d100:871b:ec55:67d:5247? (p200300cbc705d100871bec55067d5247.dip0.t-ipconnect.de. [2003:cb:c705:d100:871b:ec55:67d:5247]) by smtp.gmail.com with ESMTPSA id z17-20020a05600c221100b003fe24441e23sm4361391wml.24.2023.08.01.10.09.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 10:09:56 -0700 (PDT) Message-ID: Date: Tue, 1 Aug 2023 19:09:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 1/8] mm/gup: reintroduce FOLL_NUMA as FOLL_HONOR_NUMA_FAULT Content-Language: en-US To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Linus Torvalds , liubo , Matthew Wilcox , Hugh Dickins , Jason Gunthorpe , John Hubbard , Mel Gorman , Shuah Khan , Paolo Bonzini , stable@vger.kernel.org References: <20230801124844.278698-1-david@redhat.com> <20230801124844.278698-2-david@redhat.com> <30d86a2d-4af2-d840-91be-2e68c73a07bd@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 01.08.23 19:04, Peter Xu wrote: > On Tue, Aug 01, 2023 at 06:15:48PM +0200, David Hildenbrand wrote: >> On 01.08.23 17:48, Peter Xu wrote: >>> On Tue, Aug 01, 2023 at 02:48:37PM +0200, David Hildenbrand wrote: >>>> @@ -2240,6 +2244,12 @@ static bool is_valid_gup_args(struct page **pages, int *locked, >>>> gup_flags |= FOLL_UNLOCKABLE; >>>> } >>>> + /* >>>> + * For now, always trigger NUMA hinting faults. Some GUP users like >>>> + * KVM really require it to benefit from autonuma. >>>> + */ >>>> + gup_flags |= FOLL_HONOR_NUMA_FAULT; >>> >>> Since at it, do we want to not set it for FOLL_REMOTE, which still sounds >>> like a good thing to have? >> >> I thought about that, but decided against making that patch here more >> complicated to eventually rip it again all out in #4. > > I thought that was the whole point of having patch 4 separate, because we > should assume patch 4 may not exist in (at least) some trees, so I ignored > patch 4 when commenting here, and we should not assume it's destined to be > removed here. For me, the goal of this patch is to bring it *as close as possible* to the previous state as before, so we can backport it to stable without too many surprises (effectively, only a handful of FOLL_FORCE/ptrace user will get a different behavior). I could add a separate patch that does the FOLL_REMOTE thing, but then, maybe we should do that if patch #4 runs into real trouble :) But no strong opinion if this is what everybody wants in this patch. > >> >> I fully agree that FOLL_REMOTE does not make too much sense, but let's >> rather keep it simple for this patch. > > It's fine - I suppose this patch fixes whatever we're aware of that's > broken with FOLL_NUMA's removal, so it can even be anything on top when > needed. I assume I'm happy to ack this with/without that change, then: > > Acked-by: Peter Xu Thanks! > > PS: I still hope that the other oneliner can be squashed here directly; it > literally changes exact the same line above so reading this patch alone can > be affected. You said there you didn't want the commit message to be too > long here, but this is definitely not long at all! I bet you have similar > understanding to me on defining "long commit message". :) I'd never worry > that. Your call. No strong opinion, it just felt cleaner to not start adding what I have in that separate patch commit message in here. -- Cheers, David / dhildenb