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 5BCFDC433FE for ; Wed, 16 Nov 2022 16:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234937AbiKPQxh (ORCPT ); Wed, 16 Nov 2022 11:53:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234653AbiKPQxK (ORCPT ); Wed, 16 Nov 2022 11:53:10 -0500 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 DC4271403C for ; Wed, 16 Nov 2022 08:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668617465; 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=AKqUX0zS3ap0KjHZqWfA9Mnjw5ynZwjtWlvt/GGKCbhWkSS259iDHt7ixLXL2vQvSIoLRa UVxqNHWxgqIPmMxtAywre3EuOd36qL16GRxr2t0pMMGeA9tvDBdrStaSzRZ+Mgznauz/6I lBsqRprNPeTeqzXpVOI6X9AL7v7rAGo= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-660-0eandKzLNN2CIqiRLiQJgQ-1; Wed, 16 Nov 2022 11:51:02 -0500 X-MC-Unique: 0eandKzLNN2CIqiRLiQJgQ-1 Received: by mail-qv1-f72.google.com with SMTP id d8-20020a0cfe88000000b004bb65193fdcso13661448qvs.12 for ; Wed, 16 Nov 2022 08:51:00 -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=54rXfKpAMX4aO7Gg6SJFwKzU4rKb4zv7R5ADxo3PVXkVPJUeCBZEw5BkcP77S0ER7k FYIVjxMCAI9myGLSh0LfLKNgmQ2YXPjbtmhYd0Fn7l3f8MzF1hisSdkOpj3bsFz5gJQV dJOAAnn6OfqvAE/AOxjgm6vF/ytO4J9wMXLbITCZY/BXfuxHBehgZGdqsBbpEA9T9KjR Dpq/6qQn4A51v2DYKHy0xXPZFXPZmeXKgoili/Izxt63XjZW2kzM8PZJ5AmJbp0c03Sl VGqJyb3IrLyNeTloj0Fx9Gd55/RC9cwlBRUxtIffppK3fn5vUehf1qs9pl7jgdOFHB4W umxA== X-Gm-Message-State: ANoB5pnsOLUnct9nQGVk3hHvtD5F2kfCGqUgv2eIJzEP1G0vXj+lXMQ/ Ax4MHpQC84YYvPpuLiHaBMItwHvMVrks4RcA4nffoqNQWwGtb20yBz3BBu+M8oao+ZYueaIvDWl HKIJVtRrIzU/CBLCLVzXUJZri X-Received: by 2002:a05:622a:488a:b0:3a4:f665:7791 with SMTP id fc10-20020a05622a488a00b003a4f6657791mr21964292qtb.380.1668617460490; 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221021163703.3218176-5-jthoughton@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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