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 78A8EC001DF for ; Tue, 1 Aug 2023 17:34:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 016A894003E; Tue, 1 Aug 2023 13:34:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F096B940010; Tue, 1 Aug 2023 13:34:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DAADC94003E; Tue, 1 Aug 2023 13:34:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C8D9C940010 for ; Tue, 1 Aug 2023 13:34:16 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 912C51A05DC for ; Tue, 1 Aug 2023 17:34:16 +0000 (UTC) X-FDA: 81076234512.10.4305221 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 60B19100CC8 for ; Tue, 1 Aug 2023 17:10:00 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gFL1Ml5Z; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690909801; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1l/TRXWCo6q5BSenRhC8N4s4Tp9EqB26+z+WAcvOc7U=; b=j7pskPUUySgETnG9sVDPjko+WcST2fVmlwd/NS1RmbrqeSUF6+HU0n4NMcvTg2u8N45sJc 2jI5if2x64xWcbEYqfMleEnPenNx7LlMk/HwOe31RVNDcUaJNg0Mcll7nprSom2RVLKBvw Uy+Ho0oaz3F+hma5qNVbBAeGZUtit68= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gFL1Ml5Z; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690909801; a=rsa-sha256; cv=none; b=hJaZ6tFCrpx1KNSvNHMOIelaZpD1tC4Sk3Ijs4fGCt5jynSdos4o45YyJcHgF7GDePnCCp +HXnDJ4XmgU/+2Jn2HFLK9Cn128FbEjr4sI65Tjy1iJigEYeAVueEE0Mh/PPcSuwI4xMyY c4JryHPoyYzoGxSZsozjnBF0RgdmWM4= 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-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-V1AcV7LiO42pojU8GUMKRQ-1; Tue, 01 Aug 2023 13:09:58 -0400 X-MC-Unique: V1AcV7LiO42pojU8GUMKRQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fd2dec82a6so37361745e9.3 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=Dmk+1lLhT6dXeQsgUztKldWpzDFVkW/IkAPryQtzyogGcGSy4G0te0WhYF/DbVpcFY s+jTcD6kN4U1X70/uYtK1xy9yhxv/1VQJOgrARCLZ2gwJjU7prd+7fDazS37h5nvRnuu hdY50Ig/9kC9g2tsgx0CLH3bxlftbghyt8GgMdA+x/cA8GNmvUr+RZxKiD7okcM63KvE uZCc9n9iDqlW+D/uQEtoZq8EDJJ8dKnnL3TUiO7Roy9R4supGqokfYYN6XdaEdx6/uz7 HxgtLZ/BhRKOPWQIWP4F+q6se3qHnOlV9P6vRo9ilJqBn4Pw1N3Jj5BKOzQWi/B07135 G0kw== X-Gm-Message-State: ABy/qLYiLwjKKv0tCbOSwaRciSWKNwwd+AoLLwCvGiNtkxobNcHDoJ+u Oz63tt8MR5bdTeofiWfsh3SZuHTTwY4FePEDKOLoUVOBgdiFIgN4KXTgahR/zuJtr42auQrs+BI D18RQJCYYbdg= X-Received: by 2002:a7b:cc9a:0:b0:3fc:e1:24b5 with SMTP id p26-20020a7bcc9a000000b003fc00e124b5mr2894755wma.23.1690909797590; 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 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 60B19100CC8 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-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XxfCWI1IGeycShlT6czBTmatoWbat6CsImZ9OViVQr6TZdzjnbyCh5c9KIiaIZ6D4Jy5qaYNQgcvPCBGcZg4yzSTmyyfiiru6cz7iK6qtjJOkIhqfzDxVBf5YEBsF/eHplrFUDXLeUS0xh7apt6B4TIbQEmE0n/72K/fFxnHnyL/EOAWz0giIKodAwJVkPnAqtdO8vzzyptUSLaHtVg3hiCaKqt67CixBS96y78oKsRX+Fd6x7FCQ48t9g0S7ALcYwukUeorSJzyw6DYYmo91aEEXvz8OoeumRJJ8mxGQf59GCZR5Jgyva8JpzZ9DaONVxBovvmIoIW1Rn+RwmEYUyCtV+xgBvqURpU7VwPfmJs3ySDr4Hc5SXRyGWC+0ahTZuTj53OCxKKh+F70WAvIRO51KXI6LG194RzQH7CIaDPXPc2xOR1ydbR3iYK4Y= 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: 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