From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751768AbdHXIrs (ORCPT ); Thu, 24 Aug 2017 04:47:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46322 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdHXIrr (ORCPT ); Thu, 24 Aug 2017 04:47:47 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 52DD620274 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=vkuznets@redhat.com From: Vitaly Kuznetsov To: Linus Torvalds Cc: "Kirill A. Shutemov" , "Kirill A. Shutemov" , "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 References: <20170823134521.5068-1-vkuznets@redhat.com> <20170823195955.wnyg2dcv4c23kdoj@node.shutemov.name> <20170823223637.bjke4w3wpolrn7md@black.fi.intel.com> Date: Thu, 24 Aug 2017 10:47:41 +0200 In-Reply-To: (Linus Torvalds's message of "Wed, 23 Aug 2017 16:03:53 -0700") Message-ID: <871so1tkr6.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 24 Aug 2017 08:47:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > 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. Thanks Linus & Kirill, I actually did a microbenchmark with mmap/munmap too but wasn't able to see any measurable performace difference. > > 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. I'll send v2 enabling HAVE_RCU_TABLE_FREE on x86 unconditionally, thanks! -- Vitaly