linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
	linux-mm@kvack.org, "Andrea Arcangeli" <aarcange@redhat.com>,
	"Jérôme Glisse" <jglisse@redhat.com>
Subject: Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers
Date: Mon, 25 Jun 2018 10:10:18 +0200	[thread overview]
Message-ID: <e7f3289e-3ee3-3f02-1947-9e4327e1a864@redhat.com> (raw)
In-Reply-To: <20180625075715.GA28965@dhcp22.suse.cz>

On 25/06/2018 09:57, Michal Hocko wrote:
> On Sun 24-06-18 10:11:21, Paolo Bonzini wrote:
>> On 22/06/2018 17:02, Michal Hocko wrote:
>>> @@ -7215,6 +7216,8 @@ void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
>>>  	apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
>>>  	if (start <= apic_address && apic_address < end)
>>>  		kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
>>> +
>>> +	return 0;
>>
>> This is wrong, gfn_to_hva can sleep.
> 
> Hmm, I have tried to crawl the call chain and haven't found any
> sleepable locks taken. Maybe I am just missing something.
> __kvm_memslots has a complex locking assert. I do not see we would take
> slots_lock anywhere from the notifier call path. IIUC that means that
> users_count has to be zero at that time. I have no idea how that is
> guaranteed.

Nevermind, ENOCOFFEE.  This is gfn_to_hva, not gfn_to_pfn.  It only
needs SRCU.

Paolo

  reply	other threads:[~2018-06-25  8:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 15:02 [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers Michal Hocko
2018-06-22 15:13 ` Christian König
2018-06-22 15:24   ` Michal Hocko
2018-06-22 20:09     ` Felix Kuehling
2018-06-25  8:01       ` Michal Hocko
2018-06-25 13:31         ` Michal Hocko
     [not found] ` <152968180950.11773.3374981930722769733@mail.alporthouse.com>
2018-06-22 15:57   ` [Intel-gfx] " Michal Hocko
2018-06-22 16:18     ` Jerome Glisse
2018-06-22 16:25   ` Jerome Glisse
2018-06-24  8:11 ` Paolo Bonzini
2018-06-25  7:57   ` Michal Hocko
2018-06-25  8:10     ` Paolo Bonzini [this message]
2018-06-25  8:45       ` Michal Hocko
2018-06-25 10:34         ` Paolo Bonzini
2018-06-25 11:08           ` Michal Hocko
2018-06-27  7:44 ` Michal Hocko
2018-07-02  9:14   ` Christian König
2018-07-02 11:54     ` Michal Hocko
2018-07-02 12:13       ` Christian König
2018-07-02 12:20         ` Michal Hocko
2018-07-02 12:24           ` Christian König
2018-07-02 12:35             ` Michal Hocko
2018-07-02 12:39               ` Christian König
2018-07-02 12:56                 ` Michal Hocko
2018-07-09 12:29   ` Michal Hocko
2018-07-10 13:40     ` Leon Romanovsky
2018-07-10 14:14       ` Michal Hocko
2018-07-10 16:20         ` Leon Romanovsky
2018-07-11  9:03           ` Michal Hocko
2018-07-11 10:14             ` Leon Romanovsky
2018-07-11 11:13               ` Michal Hocko
2018-07-11 12:08                 ` Leon Romanovsky
2018-07-16  7:59         ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7f3289e-3ee3-3f02-1947-9e4327e1a864@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=jglisse@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).