Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp81980ybk; Fri, 8 May 2020 14:37:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIotbrqY8FunoWKxPsX5MdEUWvTbYpalHWMHotrte8qwSK0ipyjn9n1EDReGqI+p3YeTgSi X-Received: by 2002:a17:906:4003:: with SMTP id v3mr3677533ejj.144.1588973875274; Fri, 08 May 2020 14:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588973875; cv=none; d=google.com; s=arc-20160816; b=PoSeBLNcGRpgriO03l1LQA5+q3P+eCR106v2+MCeDIHS3kvq0rZcUMenyROnnqreYv x+lG2WWMwbsaKEW2RNAOm8wIVXtEtxM/6POPk0pNadaJpq3wkQBw5oW+oUPx1I/QAWJK gAxyAHoj4jEHZeZfpbOASVHpZJAuzA+H/sYOybMEw72S4NatnBvrRVCYpXr6eEYjPLCX MvXx9cxyIuzxQYjiAp7AshrzcG0+AbpuwAfMsZ8uqxfz0d35k3FG0/VP4ksoMiFal7H4 g029EvOqNChGr1d0ZN6bAyOnUlI7OV0t6GmGDacP0Php0luXQ8esqA+FAfRHXOE1IoqY vJkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qFWraAxlelynC7Rk/e0kRzORs8dvgqeh2eeo4UpWqq8=; b=KGMckI8PAuPJ5pL5dBIcYk6/IKcZR++Fb1szq6Cyv3KKXZIEN4n6Md4rnB4IvxsLjj mGfWlH2v2+flBWmgXuKTxCud+2U0GnnKgFlm65+Ymr5AxvsFmhX2MlsslpjMURlLh71K QL5u/kpnfE5Uzi/nPYQtPFWRzWCiaNCaD3EH9lrWBp7vTFUdtigpZZDcnqo/29jv/aPx nljgETIQ/skM9X5B+WCkU1d4sopOpmmfLcpCqkUrQQRcHYVhVZhntPULxDIH1M8So+cX ctKnaKULbxVAGPQslqQnSBIto88sQs3936pFfksmSBkCw2d3GWoBvlEiFUDbqInPxpSq hYdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si1627239ejd.83.2020.05.08.14.37.32; Fri, 08 May 2020 14:37:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbgEHVeL (ORCPT + 99 others); Fri, 8 May 2020 17:34:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:36542 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbgEHVeK (ORCPT ); Fri, 8 May 2020 17:34:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D51EAAD60; Fri, 8 May 2020 21:34:11 +0000 (UTC) Date: Fri, 8 May 2020 23:34:07 +0200 From: Joerg Roedel To: Peter Zijlstra Cc: Joerg Roedel , x86@kernel.org, hpa@zytor.com, Dave Hansen , Andy Lutomirski , rjw@rjwysocki.net, Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() Message-ID: <20200508213407.GT8135@suse.de> References: <20200508144043.13893-1-joro@8bytes.org> <20200508192000.GB2957@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508192000.GB2957@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, thanks for reviewing this! On Fri, May 08, 2020 at 09:20:00PM +0200, Peter Zijlstra wrote: > The only concern I have is the pgd_lock lock hold times. > > By not doing on-demand faults anymore, and consistently calling > sync_global_*(), we iterate that pgd_list thing much more often than > before if I'm not mistaken. Should not be a problem, from what I have seen this function is not called often on x86-64. The vmalloc area needs to be synchronized at the top-level there, which is by now P4D (with 4-level paging). And the vmalloc area takes 64 entries, when all of them are populated the function will not be called again. On 32bit it might be called more often, because synchronization happens on the PMD level, which is also used for large-page mapped ioremap regions. But these don't happen very often and there are also no VMAP stacks on x86-32 which could cause this function to be called frequently. Joerg