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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E283C0015E for ; Tue, 1 Aug 2023 17:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234388AbjHARLT (ORCPT ); Tue, 1 Aug 2023 13:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232631AbjHARLQ (ORCPT ); Tue, 1 Aug 2023 13:11:16 -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 F3EF02735 for ; Tue, 1 Aug 2023 10:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690909799; 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=gFL1Ml5Z7eKnfvjXHhWsbfhwkvs/t7CarJdAOl0czeat1Op6gsdPX4mWL9dot1Br+Ok4nw iLc4X7LQTE29D3JeqsRwCF4clGsC0xAE92MuKo8zSS39O06RQCDqa03neKMhB4U9avKWsr aBODc5UO88VSqqFsuzJxi1TGQWy+lW0= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-WmG9eF0iPZe7zX5Iw8SxxA-1; Tue, 01 Aug 2023 13:09:58 -0400 X-MC-Unique: WmG9eF0iPZe7zX5Iw8SxxA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fe19cf2796so20691765e9.0 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=fzIqranR2CFNqwQK0879QLjOClrUEYMm/yRUC9AymUbsCVblYP/cLhImub34szyTsO 12vJAG4rFJlkwQd8t0e7wat1Dfzhc1MqVUiBLpv0ZzcQkThmkiMpO9/XneSHUMJ4JuB5 Hlb2QrIUK7EQiofTbqJB8oltHRSzq/X8Cm/byjr8ETjBFKWdP0NyQ+rvP1MIIawH37jR 6OgbsHe/nnfbKKFN9SMbpWhMNU0KCOdmBSjt4PCvVzp0nl1diuVv9fanAFtKaQqYFJUZ cZAXop/YJe6WvzFz/ZxjNUG6g6iUxVkmyjO317iQtH46AiszbSaa2EkqiM/Aai8vu9OG gMOw== X-Gm-Message-State: ABy/qLaK6WH+lrH3JInt/hdgkA1lt5LGteuZWYSIibYsPFzGYk7tUlf0 QNnCk4ZnPDS2LulFyIwU61qkNzOEYJFDZRid8XWbUSAKWBaGFx9cbcu0Idk2bHIh6CYw7Gn3iJK W7oQ80LxjMbVh X-Received: by 2002:a7b:cc9a:0:b0:3fc:e1:24b5 with SMTP id p26-20020a7bcc9a000000b003fc00e124b5mr2894744wma.23.1690909797588; Tue, 01 Aug 2023 10:09:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEy+R1U+qIKux7XS+l+xQITmSgyj55taDV+mQEkAlldXw1fmNp7lyrJvX5NkSWlbviyLnW9yw== 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 Precedence: bulk List-ID: X-Mailing-List: kvm@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