From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by kanga.kvack.org (Postfix) with ESMTP id 78C816B026F for ; Wed, 6 Apr 2016 02:56:15 -0400 (EDT) Received: by mail-vk0-f41.google.com with SMTP id e6so46990641vkh.2 for ; Tue, 05 Apr 2016 23:56:15 -0700 (PDT) Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com. [2607:f8b0:400c:c05::236]) by mx.google.com with ESMTPS id 93si315902uaq.107.2016.04.05.23.56.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 23:56:14 -0700 (PDT) Received: by mail-vk0-x236.google.com with SMTP id k1so47035334vkb.0 for ; Tue, 05 Apr 2016 23:56:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5704B0E4.9060300@redhat.com> References: <57044C3A.7060109@redhat.com> <5704B0E4.9060300@redhat.com> Date: Tue, 5 Apr 2016 23:56:14 -0700 Message-ID: Subject: Re: [PATCH 17/31] kvm: teach kvm to map page teams as huge pages. From: Andres Lagar-Cavilla Content-Type: multipart/alternative; boundary=001a114314dc2f4f41052fcb75d3 Sender: owner-linux-mm@kvack.org List-ID: To: Paolo Bonzini Cc: Hugh Dickins , Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Yang Shi , Ning Qu , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org --001a114314dc2f4f41052fcb75d3 Content-Type: text/plain; charset=UTF-8 The rule is: this is_huge_tmpfs() block of code could be used anywhere a lock serializing against mmu notifiers is held. It's arguable (mildly?) how broad of a clientele for huge tmpfs that is, outside kvm. Andres On Tue, Apr 5, 2016 at 11:47 PM, Paolo Bonzini wrote: > > > On 06/04/2016 03:12, Hugh Dickins wrote: > > Hah, you've lighted on precisely a line of code where I changed around > > what Andres had - I thought it nicer to pass down vcpu, because that > > matched the function above, and in many cases vcpu is not dereferenced > > here at all. So, definitely blame me not Andres for that interface. > > > > Oh, actually I'm fine with the interface if it's in arch/x86/kvm. I'm > just pointing out that---putting aside the locking question---it's a > pretty generic thing that doesn't really need access to KVM data > structures. > > Paolo > -- Andres Lagar-Cavilla | Google Kernel Team | andreslc@google.com --001a114314dc2f4f41052fcb75d3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The rule is: this is_huge_tmpfs() block of code could be u= sed anywhere a lock serializing against mmu notifiers is held.

It's arguable (mildly?) how broad of a clientele for huge tmpfs = that is, outside kvm.

Andres

On Tue, Apr 5, 2016 at 11:4= 7 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:


On 06/04/2016 03:12, Hugh Dickins wrote:
> Hah, you've lighted on precisely a line of code where I changed ar= ound
> what Andres had - I thought it nicer to pass down vcpu, because that > matched the function above, and in many cases vcpu is not dereferenced=
> here at all.=C2=A0 So, definitely blame me not Andres for that interfa= ce.
>

Oh, actually I'm fine with the interface if it's in arch/x86= /kvm.=C2=A0 I'm
just pointing out that---putting aside the locking question---it's a pretty generic thing that doesn't really need access to KVM data struct= ures.

Paolo



--
Andres Lagar-Cavilla=C2=A0|=C2=A0Google Kernel Team |=C2=A0andreslc@google.com=C2=A0
--001a114314dc2f4f41052fcb75d3-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org