public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* running get_user_pages() from kernel thread
@ 2009-06-16 18:05 Izik Eidus
  2009-06-16 18:13 ` Andrea Arcangeli
  0 siblings, 1 reply; 23+ messages in thread
From: Izik Eidus @ 2009-06-16 18:05 UTC (permalink / raw)
  To: linux-kernel, Rik van Riel; +Cc: Hugh Dickins, Andrea Arcangeli, nickpiggin

Hey,

ksm is running from its kernel thread context get_user_pages(), but look 
like it isnt safe to do get_user_pages() from kernel thread:
get_user_pages may lead into do_swap_page() that may lead into calling 
grab_swap_token()

Now grab_swap_token() will do:
current_interval = global_faults - current->mm->... (here is the bug... 
(kernel thread doesnt have mm strcture)

So the question is: is this thing is by desgin? (that kernel thread cant 
call get_user_pages???), should i use something like switch_mm()??

Thanks.



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-06-22  0:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 18:05 running get_user_pages() from kernel thread Izik Eidus
2009-06-16 18:13 ` Andrea Arcangeli
2009-06-16 18:38   ` Hugh Dickins
2009-06-16 18:55     ` Rik van Riel
2009-06-16 19:45       ` Hugh Dickins
2009-06-16 20:38         ` Andrea Arcangeli
2009-06-16 21:02           ` Hugh Dickins
2009-06-16 21:19         ` Rik van Riel
2009-06-16 19:20     ` Izik Eidus
2009-06-16 20:45       ` Hugh Dickins
2009-06-16 21:25         ` Izik Eidus
2009-06-16 20:08     ` Johannes Weiner
2009-06-16 20:57       ` Hugh Dickins
2009-06-16 21:50         ` [patch 1/2] mm: make swap token dummies static inlines Johannes Weiner
2009-06-16 21:55           ` Rik van Riel
2009-06-16 21:50         ` [patch 2/2] mm: remove task assumptions from swap token Johannes Weiner
2009-06-16 21:56           ` Rik van Riel
2009-06-17  2:00           ` Minchan Kim
2009-06-17  8:31             ` Johannes Weiner
2009-06-16 21:52         ` running get_user_pages() from kernel thread Johannes Weiner
2009-06-21 13:02           ` [PATCH] mm: pass mm to grab_swap_token Hugh Dickins
2009-06-22  0:32             ` Minchan Kim
2009-06-16 21:16       ` running get_user_pages() from kernel thread Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox