Received: by 2002:ac8:678b:0:b0:405:464a:c27a with SMTP id b11csp7064qtp; Tue, 1 Aug 2023 11:58:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9QhPmWr2mSvIZFk9vqULytosXM4fZEaZv6A2jiaKhH3CLvD2Mw6WVpwqYSNky9fczBvQ1 X-Received: by 2002:a05:6358:91a:b0:139:d6cf:c430 with SMTP id r26-20020a056358091a00b00139d6cfc430mr4938490rwi.6.1690916310216; Tue, 01 Aug 2023 11:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690916310; cv=none; d=google.com; s=arc-20160816; b=tvff9Bt+6ZVMedwdw/fAxhioNJcGqlTIxfnkXQvkJF87kLBs7XLxVgWS/p2HX6BehV xl7OQhB+E+sZzNhIwamfWURPceT2uOEM9k+UyQvtDtJoENATDUTEZqoKtf6AUECdcz3+ M+KbundPaGg2ZUtxbFCO3NJ8OCiBNjzDF89M2o/kmBYXIzOdOTPBFprIuRWQXVgO21kh 1ep344bK9OWKBNptHBIT54neDWpUeBjkOoOAEUXj7yH6jmh87r9Ttt9jD0ukHDPSu+fc 60tP/tTrEceqc0NVwPjeI6YoeEpoe6H9ILE4a+FkLTzWXqXjaYc+yZlhdKMNwyCKWqTC yDfg== 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=fzL/Ybnx3HfszMfs/mHvvF2PskJxWsEeOJHTJUi83hM=; fh=AyOeFHyJHcXQ8TtOeaRWjBtQ33o3Ty4JPa7vM2tF6Jk=; b=06jVghgsIkx+t/VBCmMI+d5SkeqHWS2Li5cHkls1WIAhHkzV3wzf4bBcPDjIC171Kj vEbYjhBJkzeBuvWnkfEqgSZxiT/B7DwW6zHKlemRCGHvvVjrGROvJ5YkTpzj1ZhQZlNW luwrNaLd3A8ytnpcqoWegyhuUtC2x1auDTXoPGhXWRlAk+EPi+z1CcVVfetqxg5IyR66 Y5aOze6dvMtvbEBHe0tDW4Xp0uSFxDVkZ4l+wAbByalKcCHeTN3bA2O4kPg0uPtBjBcv il8rhA3RPpGCfKnSF1EGjgt1C/4AFYFwTmwvnQtK2eWfXEBQh+v1nqSU6LJASlR4qml9 yJqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HbhuYcgc; 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 n127-20020a632785000000b0055e607f1e99si9328389pgn.882.2023.08.01.11.58.16; Tue, 01 Aug 2023 11:58:30 -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=HbhuYcgc; 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 S235004AbjHAPs5 (ORCPT + 99 others); Tue, 1 Aug 2023 11:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232336AbjHAPsz (ORCPT ); Tue, 1 Aug 2023 11:48:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B72BF for ; Tue, 1 Aug 2023 08:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690904889; 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=fzL/Ybnx3HfszMfs/mHvvF2PskJxWsEeOJHTJUi83hM=; b=HbhuYcgc3sE7riyuZxG7c91FsLndVUXBw5RyxWevwof1UhxC0jfphbtRw+OTkCTms2HpgT Z2zoaMukJ3HBnB3UKW+T/pRecHJPhj3n2IlZbUnAn3ujDHRWqCHAzH/4p649HKJd+zDc8A fj13qU4bAzh6P9ajVU4fGM6h0p+TOq4= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-306-wYv3iCTLNs-ix1hz2YdarQ-1; Tue, 01 Aug 2023 11:48:08 -0400 X-MC-Unique: wYv3iCTLNs-ix1hz2YdarQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-63d05a56b4dso14952556d6.0 for ; Tue, 01 Aug 2023 08:48:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690904888; x=1691509688; 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=fzL/Ybnx3HfszMfs/mHvvF2PskJxWsEeOJHTJUi83hM=; b=e7hxI0IXqjVGoAik9UeTmIypcfkCqbpQiPdXXmSGdfjVzNpW9HB+z9jShsr51ylOLP 5FvRUEvwxRQ3zlIxLrJllhoyab3xdUcUcTRPWrkQcGgtZQGBkYD/bNBZCTmrkgWkFAep Hn5XbFb+UaChijXTFCm9bLXgd9zC6dc+LSeqfAsXFpksRe40E1wQW3mjqMnSGjGmuXlX wO4VD8+svf03/JbTpBFifMiwOuUPDLcKoAyeMcxCBv3WwYjKSzQ4asyxLoIn+jxi4T/p mjP3owSQOHW/fDdn2Je7QthjD1dHN512sNZPdmBZlCZji04Fte5fVFGDlPGHHotO12UY ecww== X-Gm-Message-State: ABy/qLaQf9otk9vOMJ36y91X3HbIQiBSxeKm/3TyLtHmToDNgAyGYZho hd1tZkpLRdJS7aDU1zwhjlxgCV/4y0WSHjjNLwhls8KusfAN0SzYSouswWQddN20l0zwlZkrpcg zqaTaw2leyuS2LXrBif1VUKAh X-Received: by 2002:a05:6214:f6d:b0:63d:2a0b:3f83 with SMTP id iy13-20020a0562140f6d00b0063d2a0b3f83mr13483334qvb.6.1690904887776; Tue, 01 Aug 2023 08:48:07 -0700 (PDT) X-Received: by 2002:a05:6214:f6d:b0:63d:2a0b:3f83 with SMTP id iy13-20020a0562140f6d00b0063d2a0b3f83mr13483311qvb.6.1690904887526; Tue, 01 Aug 2023 08:48:07 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id h16-20020a0cf410000000b0063d119034a3sm4695385qvl.94.2023.08.01.08.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 08:48:07 -0700 (PDT) Date: Tue, 1 Aug 2023 11:48:03 -0400 From: Peter Xu To: David Hildenbrand 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 Subject: Re: [PATCH v2 1/8] mm/gup: reintroduce FOLL_NUMA as FOLL_HONOR_NUMA_FAULT Message-ID: References: <20230801124844.278698-1-david@redhat.com> <20230801124844.278698-2-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230801124844.278698-2-david@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=ham 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 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? Other than that, looks good here. Side note: when I was looking at the flags again just to check the interactions over numa balancing, I found FOLL_NOFAULT and I highly suspect that's not needed, instead it just wants to use follow_page[_mask]() with some proper gup flags passed over.. but that's off topic. Thanks, -- Peter Xu