Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1164435

Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code
Date 2015-06-13 01:40 +0200
Message-ID <pAGIi-3SR-1@gated-at.bofh.it> (permalink)
References (5 earlier) <pAsci-7Wu-27@gated-at.bofh.it> <pAsci-7Wu-25@gated-at.bofh.it> <pADU5-87c-9@gated-at.bofh.it> <pAEds-8uK-13@gated-at.bofh.it> <pAFMd-2pg-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/12, Boris Ostrovsky wrote:
>
> On 06/12/2015 04:53 PM, Oleg Nesterov wrote:
>>>
>>> 	for_each_process(p) {
>>>
>>> 		for_each_thread(p, t) {
>>> 			if (t->mm) {
>>> 				do_something(t->mm);
>>> 				break;
>>> 			}
>>> 		}
>>> 	}
>>>
>>> But either way I don't understand what protects this ->mm. Perhaps this needs
>>> find_lock_task_mm().
>>
>> And, I don't understand this code, probably this doesn't matter, but.
>>
>> unpin_all() is probably fine, but xen_mm_pin_all() can race with fork()
>> and miss the new child. Is it OK?
>
>
> Currently xen_mm_pin_all() is only called in the suspend path, out of
> stop_machine(), so presumably at that time fork is not possible.

OK, thanks, this also means that this code shouldn't worry about ->mm,
it should be stable.

But for_each_process() in sync_global_pgds() should, afaics.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the  Xen guest code Linus Torvalds <torvalds@linux-foundation.org> - 2015-06-11 22:40 +0200
  Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the  Xen guest code Linus Torvalds <torvalds@linux-foundation.org> - 2015-06-11 22:50 +0200
    Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from  the Xen guest code Oleg Nesterov <oleg@redhat.com> - 2015-06-13 01:40 +0200
    Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from  the Xen guest code Ingo Molnar <mingo@kernel.org> - 2015-06-13 09:30 +0200
      Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from  the Xen guest code Oleg Nesterov <oleg@redhat.com> - 2015-06-13 20:10 +0200

csiph-web