[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <535E744A.1060708@redhat.com>
Date: Mon, 28 Apr 2014 17:31:22 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Andrea Arcangeli <aarcange@...hat.com>,
Oleg Nesterov <oleg@...hat.com>
CC: Christian Borntraeger <borntraeger@...ibm.com>,
Avi Kivity <avi.kivity@...il.com>,
Gleb Natapov <gleb@...nel.org>,
Dominik Dingel <dingel@...ux.vnet.ibm.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] KVM: async_pf: kill the unnecessary use_mm/unuse_mm
async_pf_execute()
Il 28/04/2014 16:06, Andrea Arcangeli ha scritto:
>> >
>> > "task" is only used to increment task_struct->xxx_flt. I don't think
>> > async_pf_execute() actually needs this (current is PF_WQ_WORKER after
>> > all), but I didn't dare to do another change in the code I can hardly
>> > understand.
> Considering the faults would be randomly distributed among the kworker
> threads my preference would also be for NULL instead of current.
>
> ptrace and uprobes tends to be the only two places that look into
> other mm with gup, ptrace knows the exact pid that it is triggering
> the fault into, so it also can specify the correct task so the fault
> goes in the right task struct. uprobes uses NULL.
KVM knows the correct task (it was in current when kvm_create_vm was
called), and doing accounting right would be nice. But I agree that
NULL is less misleading than a dummy current, and I applied patch 3 too.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists