Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751524AbdLNGnd (ORCPT ); Thu, 14 Dec 2017 01:43:33 -0500 Received: from mga06.intel.com ([134.134.136.31]:43057 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbdLNGnc (ORCPT ); Thu, 14 Dec 2017 01:43:32 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,399,1508828400"; d="scan'208";a="2414939" From: "Huang\, Ying" To: Dave Hansen Cc: Lu Baolu , Bob Liu , "Thomas Gleixner" , Ingo Molnar , "H . Peter Anvin" , Alex Williamson , "Joerg Roedel" , David Woodhouse , Rik van Riel , Michal Hocko , Dave Jiang , , , , , Vegard Nossum , Andy Lutomirski , Matthew Wilcox , Andrew Morton , "Paul E . McKenney" , "Kirill A . Shutemov" , Kees Cook , "xieyisheng \(A\)" Subject: Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB References: <1513213366-22594-1-git-send-email-baolu.lu@linux.intel.com> <1513213366-22594-2-git-send-email-baolu.lu@linux.intel.com> <5A31F232.90901@linux.intel.com> <4466eac3-c4f5-47e4-e568-912a560240c1@intel.com> Date: Thu, 14 Dec 2017 14:43:27 +0800 In-Reply-To: <4466eac3-c4f5-47e4-e568-912a560240c1@intel.com> (Dave Hansen's message of "Wed, 13 Dec 2017 22:28:37 -0800") Message-ID: <87efnxn71s.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 721 Lines: 20 Hi, Dave, Dave Hansen writes: > On 12/13/2017 07:38 PM, Lu Baolu wrote: >> 2. When vmalloc/vfree interfaces are called, the page mappings >> for kernel memory might get changed. And current code calls >> flush_tlb_kernel_range() to flush CPU TLBs only. The IOTLB or >> DevTLB will be stale compared to that on the cpu for kernel >> mappings. > > What's the plan to deal with all of the ways other than vmalloc() that > the kernel changes the page tables? The kernel MMU notifier is called in flush_tlb_kernel_range(). So IOMMU will be notified for TLB flushing caused by all ways that the kernel changes the page tables including vmalloc, kmap, etc. Best Regards, Huang, Ying