From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753464AbcIBUj1 (ORCPT ); Fri, 2 Sep 2016 16:39:27 -0400 Received: from mga03.intel.com ([134.134.136.65]:44471 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbcIBUjY (ORCPT ); Fri, 2 Sep 2016 16:39:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,272,1470726000"; d="scan'208";a="1045048724" Subject: Re: [RFC PATCH v2 2/3] xpfo: Only put previous userspace pages into the hot cache To: Juerg Haefliger , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, linux-x86_64@vger.kernel.org References: <1456496467-14247-1-git-send-email-juerg.haefliger@hpe.com> <20160902113909.32631-1-juerg.haefliger@hpe.com> <20160902113909.32631-3-juerg.haefliger@hpe.com> Cc: vpk@cs.columbia.edu From: Dave Hansen Message-ID: <57C9E37A.9070805@intel.com> Date: Fri, 2 Sep 2016 13:39:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160902113909.32631-3-juerg.haefliger@hpe.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2016 04:39 AM, Juerg Haefliger wrote: > Allocating a page to userspace that was previously allocated to the > kernel requires an expensive TLB shootdown. To minimize this, we only > put non-kernel pages into the hot cache to favor their allocation. But kernel allocations do allocate from these pools, right? Does this just mean that kernel allocations usually have to pay the penalty to convert a page? So, what's the logic here? You're assuming that order-0 kernel allocations are more rare than allocations for userspace?