lkml.org 
[lkml]   [2015]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code
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.



\
 
 \ /
  Last update: 2015-06-13 02:01    [W:0.253 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site