From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbdHXIrx (ORCPT ); Thu, 24 Aug 2017 04:47:53 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35168 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbdHXIru (ORCPT ); Thu, 24 Aug 2017 04:47:50 -0400 Date: Thu, 24 Aug 2017 11:47:46 +0300 From: "Kirill A. Shutemov" To: Linus Torvalds Cc: "Kirill A. Shutemov" , Vitaly Kuznetsov , the arch/x86 maintainers , Linux Kernel Mailing List , xen-devel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Jork Loeser , KY Srinivasan , Stephen Hemminger , Steven Rostedt , Juergen Gross , Boris Ostrovsky , Andrew Cooper , Andy Lutomirski Subject: Re: [PATCH] x86: enable RCU based table free when PARAVIRT Message-ID: <20170824084746.brbfcth76yew6lr2@node.shutemov.name> References: <20170823134521.5068-1-vkuznets@redhat.com> <20170823195955.wnyg2dcv4c23kdoj@node.shutemov.name> <20170823223637.bjke4w3wpolrn7md@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 23, 2017 at 04:03:53PM -0700, Linus Torvalds wrote: > On Wed, Aug 23, 2017 at 3:36 PM, Kirill A. Shutemov > wrote: > > > > Below is test cases that allocates a lot of page tables and measuare > > fork/exit time. (I'm not entirely sure it's the best way to stress the > > codepath.) > > Looks ok to me. Doing a profile (without the RCU freeing, obviously) gives me > > 0.77% a.out [kernel.vmlinux] [k] free_pgd_range > > > ▒ > > so it does seem to spend time in the page directory code. > > > Unpatched: average 4.8322s, stddev 0.114s > > Patched: average 4.8362s, stddev 0.111s > > Ok, I vote for avoiding the complexity of two different behaviors, and > just making the page table freeing use RCU unconditionally. > > If actively trying to trigger that code doesn't show a real measurable > difference, I don't think it matters, and the fewer different code > paths we have, the better. Numbers from bigger 2-socket machine: Unpatched: average 5.0542s, stddev 0.058s Patched: average 5.0440s, stddev 0.072s Still fine. I don't see a reason not to go this path. -- Kirill A. Shutemov