From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751283AbdHWXDz (ORCPT ); Wed, 23 Aug 2017 19:03:55 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:37484 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbdHWXDy (ORCPT ); Wed, 23 Aug 2017 19:03:54 -0400 MIME-Version: 1.0 In-Reply-To: <20170823223637.bjke4w3wpolrn7md@black.fi.intel.com> References: <20170823134521.5068-1-vkuznets@redhat.com> <20170823195955.wnyg2dcv4c23kdoj@node.shutemov.name> <20170823223637.bjke4w3wpolrn7md@black.fi.intel.com> From: Linus Torvalds Date: Wed, 23 Aug 2017 16:03:53 -0700 X-Google-Sender-Auth: 1cQLcgEl6Mkq0QdNE6R0Wxt9KiA Message-ID: Subject: Re: [PATCH] x86: enable RCU based table free when PARAVIRT To: "Kirill A. Shutemov" 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7NN40o3018082 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. Linus