Re: can't oom-kill zap the victim's memory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 09/20/15 11:05, Linus Torvalds wrote:
On Sun, Sep 20, 2015 at 5:56 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
In this case the workqueue thread will block.
What workqueue thread?

   pagefault_out_of_memory ->
      out_of_memory ->
         oom_kill_process

as far as I can tell, this can be called by any task. Now, that
pagefault case should only happen when the page fault comes from user
space, but we also have

   __alloc_pages_slowpath ->
      __alloc_pages_may_oom ->
         out_of_memory ->
            oom_kill_process

which can be called from just about any context (but atomic
allocations will never get here, so it can schedule etc).

So what's your point? Explain again just how do you guarantee that you
can take the mmap_sem.

                       Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .dadsf
Don't email: <a href="" class="moz-txt-link-rfc2396E" href="mailto:dont@xxxxxxxxx">"dont@xxxxxxxxx"> email@xxxxxxxxx </a>
Would it be a cleaner design in general to require all threads to completely exit kernel space before being terminated?  Possibly expedited by noticing fatal signals and riding the EINTR rocket back up the stack?

My two cents:  If we do that we won't have to worry about fatally wounded tasks slipping into a coma before they cough up any semaphores or locks.


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]