From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932651AbdHWU1U (ORCPT ); Wed, 23 Aug 2017 16:27:20 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36682 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932407AbdHWU1T (ORCPT ); Wed, 23 Aug 2017 16:27:19 -0400 MIME-Version: 1.0 In-Reply-To: <20170823195955.wnyg2dcv4c23kdoj@node.shutemov.name> References: <20170823134521.5068-1-vkuznets@redhat.com> <20170823195955.wnyg2dcv4c23kdoj@node.shutemov.name> From: Linus Torvalds Date: Wed, 23 Aug 2017 13:27:18 -0700 X-Google-Sender-Auth: Mbq8b6113x1LrfuKTOMHPAqtoBQ Message-ID: Subject: Re: [PATCH] x86: enable RCU based table free when PARAVIRT To: "Kirill A. Shutemov" Cc: Vitaly Kuznetsov , "the arch/x86 maintainers" , Linux Kernel Mailing List , xen-devel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "Kirill A. Shutemov" , Peter Zijlstra , Jork Loeser , KY Srinivasan , Stephen Hemminger , Steven Rostedt , Juergen Gross , Boris Ostrovsky , Andrew Cooper , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 23, 2017 at 12:59 PM, Kirill A. Shutemov wrote: > > In this case we need performance numbers for !PARAVIRT kernel. Yes. > Numbers for tight loop of "mmap(MAP_POPULATE); munmap()" might be > interesting too for worst case scenario. Actually, I don't think you want to populate all the pages. You just want to populate *one* page, in order to build up the page directory structure, not allocate all the final points. And we only free the actual page tables when there is nothing around, so it should be at least a 2MB-aligned region etc. So you should do a *big* allocation, and then touch a single page in the middle, and then minmap it - that should give you maximal page table activity. Otherwise the page tables will generally just stay around. Realistically, it's mainly exit() that frees page tables. Yes, you may have a few page tables free'd by a normal munmap(), but it's usually very limited. Which is why I suggested that script-heavy thing with lots of small executables. That tends to be the main realistic load that really causes a ton of page directory activity. Linus