From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRqN-0004wD-0Q for qemu-devel@nongnu.org; Wed, 27 Apr 2016 11:57:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avRqH-000095-TY for qemu-devel@nongnu.org; Wed, 27 Apr 2016 11:57:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRqH-00008z-Ox for qemu-devel@nongnu.org; Wed, 27 Apr 2016 11:57:33 -0400 Date: Wed, 27 Apr 2016 17:57:30 +0200 From: Andrea Arcangeli Message-ID: <20160427155730.GB11700@redhat.com> References: <1461758686-27157-1-git-send-email-aarcange@redhat.com> <20160427135030.GB22035@node.shutemov.name> <20160427145957.GA9217@redhat.com> <20160427151834.GC22035@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160427151834.GC22035@node.shutemov.name> Subject: Re: [Qemu-devel] [PATCH 1/1] mm: thp: kvm: fix memory corruption in KVM with THP enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Kirill A. Shutemov" Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, qemu-devel@nongnu.org, "Dr. David Alan Gilbert" , "Li, Liang Z" , Amit Shah , Paolo Bonzini On Wed, Apr 27, 2016 at 06:18:34PM +0300, Kirill A. Shutemov wrote: > Okay, I see. > > But do we really want to make PageTransCompoundMap() visiable beyond KVM > code? It looks like too KVM-specific. Any other secondary MMU notifier manager (KVM is just one of the many MMU notifier users) will need the same information if it doesn't want to run a flood of get_user_pages_fast and it can support multiple granularity in the secondary MMU mappings, so I think it is justified to be exposed not just to KVM. The other option would be to move transparent_hugepage_adjust to mm/huge_memory.c but that currently has all kind of KVM data structures in it, so it's definitely not a cut-and-paste work, so I couldn't do a fix as cleaner as this one for 4.6.