Re: [patch v2 2/2] oom: kill all threads sharing oom killed task's mm

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

 



> > On Thu, 19 Aug 2010, KOSAKI Motohiro wrote:
> > 
> > > > This is especially necessary to solve an mm->mmap_sem livelock issue
> > > > whereas an oom killed thread must acquire the lock in the exit path while
> > > > another thread is holding it in the page allocator while trying to
> > > > allocate memory itself (and will preempt the oom killer since a task was
> > > > already killed).  Since tasks with pending fatal signals are now granted
> > > > access to memory reserves, the thread holding the lock may quickly
> > > > allocate and release the lock so that the oom killed task may exit.
> > > 
> > > I can't understand this sentence. mm sharing is happen when vfork, That
> > > said, parent process is always sleeping. why do we need to worry that parent
> > > process is holding mmap_sem?
> > > 
> > 
> > No, I'm talking about threads with CLONE_VM and not CLONE_THREAD (or 
> > CLONE_VFORK, in your example).  They share the same address space but are 
> > in different tgid's and may sit holding mm->mmap_sem looping in the page 
> > allocator while we know we're oom and there's no chance of freeing any 
> > more memory since the oom killer doesn't kill will other tasks have yet to 
> > exit.
> 
> Why don't you use pthread library? Is there any good reason? That said,
> If you are trying to optimize neither thread nor vfork case, I'm not charmed
> this because 99.99% user don't use it. but even though every user will get 
> performance degression. Can you please consider typical use case optimization?

That said, This was NAKed while this patch makes end user unhappy. please
fix it.




--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[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]