Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbbGVXFX (ORCPT ); Wed, 22 Jul 2015 19:05:23 -0400 Received: from mga09.intel.com ([134.134.136.24]:51935 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbbGVXFW (ORCPT ); Wed, 22 Jul 2015 19:05:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,526,1432623600"; d="scan'208";a="611096585" Message-ID: <55B021B1.5020409@intel.com> Date: Wed, 22 Jul 2015 16:05:21 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Catalin Marinas , David Rientjes CC: linux-mm , Linux Kernel Mailing List , Andrew Morton , Andrea Arcangeli Subject: Re: [PATCH] mm: Flush the TLB for a single address in a huge page References: <1437585214-22481-1-git-send-email-catalin.marinas@arm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 21 On 07/22/2015 03:48 PM, Catalin Marinas wrote: > You are right, on x86 the tlb_single_page_flush_ceiling seems to be > 33, so for an HPAGE_SIZE range the code does a local_flush_tlb() > always. I would say a single page TLB flush is more efficient than a > whole TLB flush but I'm not familiar enough with x86. The last time I looked, the instruction to invalidate a single page is more expensive than the instruction to flush the entire TLB. We also don't bother doing ranged flushes _ever_ for hugetlbfs TLB invalidations, but that was just because the work done around commit e7b52ffd4 didn't see any benefit. That said, I can't imagine this will hurt anything. We also have TLBs that can mix 2M and 4k pages and I don't think we did back when we put that code in originally. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/