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 346A5C43219 for ; Wed, 16 Nov 2022 16:51:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E0E76B0072; Wed, 16 Nov 2022 11:51:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 991816B0073; Wed, 16 Nov 2022 11:51:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 831C16B0074; Wed, 16 Nov 2022 11:51:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 706826B0072 for ; Wed, 16 Nov 2022 11:51:10 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D46DDC045D for ; Wed, 16 Nov 2022 16:51:09 +0000 (UTC) X-FDA: 80139895458.17.591C7F3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf23.hostedemail.com (Postfix) with ESMTP id 62C78140005 for ; Wed, 16 Nov 2022 16:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668617468; 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=G55FrDAGyGXiishVQf4ECL+0mTuEqsMoVobpqZUA3Kw=; b=BCyKAJOLY4gMFEGPNT61FvzKQCPJGl8ANDsa4UegKicVtBuA5OImN1M/bBi//pv9oTBBZ0 fuQlL7ZxUPVRRiw7aesb8fods4e7ru+Lua0zael4zU5XEgXZauLMD0uo6e5NDNoT/qgPMU 4vXyky4kUdkfX37oUYkJcaekMxj6gh8= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-586-u2w4TiPNMpSb8qvZ5-T1HA-1; Wed, 16 Nov 2022 11:51:03 -0500 X-MC-Unique: u2w4TiPNMpSb8qvZ5-T1HA-1 Received: by mail-qt1-f197.google.com with SMTP id v12-20020ac8578c000000b003a50eb13e29so13414111qta.3 for ; Wed, 16 Nov 2022 08:51:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=G55FrDAGyGXiishVQf4ECL+0mTuEqsMoVobpqZUA3Kw=; b=60i4uWvvsKjYgLa7DSnDravWsXfGMHsvwZIs/UKF13lJzQjbXpMBEkoyUs8PrX1LpP DnctBq+48hAwRK5555YM4qZjL7gZcTDvGRWJl3Idc98X2Yy4yV21DUSrdR29SFBD2mKv 0ZZWXVkIAf8pauq4owJU7HudEha8xS8A8VNtAd2k8th2gbrCG9g2kZpHLf0V0oIR11Iz pRNyHjUC0wIF2LpJ6D4QJE2GZvzkx2/3rDPASwmKXuBCqQxk0vVlNv+bieTuD/LpQGgT h2uAo5fu4D5sjQsyXbaFLYpDp6b9ni1DH4FkBgdbJLmuk2aDp2EeryIvSJkw1r6ff/V7 14SQ== X-Gm-Message-State: ANoB5pnsa83jVfHmfoHA0rSQBjStqa3c4RJzmQn36heI/lsZCrDm2MAh UShHVybOrc1XdlyerENVs95i0StLOJRcFrUjnqSxXomO6Cpqf+BOt5QPpYKnrlBMkRDcpvpI5Cm V7X53ElxrcPA= X-Received: by 2002:a05:622a:488a:b0:3a4:f665:7791 with SMTP id fc10-20020a05622a488a00b003a4f6657791mr21964280qtb.380.1668617460488; Wed, 16 Nov 2022 08:51:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6VF+Mw1C1c2yDBORYsI9Dm3FfH9tOiFFWRqDix38ykCMkMv0RyJve4sg6IUZLzg6NxpMkLJA== X-Received: by 2002:a05:622a:488a:b0:3a4:f665:7791 with SMTP id fc10-20020a05622a488a00b003a4f6657791mr21964260qtb.380.1668617460217; Wed, 16 Nov 2022 08:51:00 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-46-70-31-27-79.dsl.bell.ca. [70.31.27.79]) by smtp.gmail.com with ESMTPSA id s1-20020a05620a0bc100b006faaf6dc55asm10464328qki.22.2022.11.16.08.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 08:50:59 -0800 (PST) Date: Wed, 16 Nov 2022 11:50:58 -0500 From: Peter Xu To: James Houghton Cc: Mike Kravetz , Muchun Song , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Zach O'Keefe , Manish Mishra , Naoya Horiguchi , "Dr . David Alan Gilbert" , "Matthew Wilcox (Oracle)" , Vlastimil Babka , Baolin Wang , Miaohe Lin , Yang Shi , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 04/47] hugetlb: only adjust address ranges when VMAs want PMD sharing Message-ID: References: <20221021163703.3218176-1-jthoughton@google.com> <20221021163703.3218176-5-jthoughton@google.com> MIME-Version: 1.0 In-Reply-To: <20221021163703.3218176-5-jthoughton@google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668617469; a=rsa-sha256; cv=none; b=gu55tihTrcSfa/ZZTQFhp7qDzjSUeQXxP9BN0uVzXCQTIT+qL+tNdEd1lioEXBxQdobhBJ zXYu0WK0GkMW36gypuRVoeL/p/mG/x+lqN/obsCWEnLA/NosdrZHbPoZZuOpustPernHJd XMwVlfdwRa19Y/ESgFipl2CK8iKvR7s= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BCyKAJOL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668617469; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=G55FrDAGyGXiishVQf4ECL+0mTuEqsMoVobpqZUA3Kw=; b=CF72uzICTCxIPLuP8ieyNXWOkJK2ODYYSxRRI1yY7/04QxhZzaaa9runXroFkzWhASnwCD hxGTondmuFfFXn7Udn0cl9rKdG6ijneIHUbxMqw5SOJPwIy24Gn799IbofDx46Oz6l2kpn vYgRJAdTlSkwHZt+9C50Wrmb5Dv4t90= Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BCyKAJOL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com X-Rspam-User: X-Stat-Signature: uhj3zhbk99b4oiusgbisofxj5r4f6i53 X-Rspamd-Queue-Id: 62C78140005 X-Rspamd-Server: rspam11 X-HE-Tag: 1668617469-619177 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 Fri, Oct 21, 2022 at 04:36:20PM +0000, James Houghton wrote: > Currently this check is overly aggressive. For some userfaultfd VMAs, > VMA sharing is disabled, yet we still widen the address range, which is > used for flushing TLBs and sending MMU notifiers. > > This is done now, as HGM VMAs also have sharing disabled, yet would > still have flush ranges adjusted. Overaggressively flushing TLBs and > triggering MMU notifiers is particularly harmful with lots of > high-granularity operations. > > Signed-off-by: James Houghton Acked-by: Peter Xu -- Peter Xu