lkml.org 
[lkml]   [2006]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm: serialize OOM kill operations
Dave Peterson wrote:
> On Wednesday 26 April 2006 20:33, Nick Piggin wrote:
>
>>Dave Peterson wrote:
>>
>>>If you prefer the above implementation, I can rework the patch as
>>>above.
>>
>>I think you need a semaphore?
>
>
> In this particular case, I think a semaphore is unnecessary because
> we just want out_of_memory() to return to its caller if an OOM kill
> is already in progress (as opposed to waiting in out_of_memory() and
> then starting a new OOM kill operation). What I want to avoid is the

When you are holding the spinlock, you can't schedule and the lock
really should be released by the same process that took it. Are you
OK with that?

>>
>>Mainly the cost of increasing cacheline footprint. I think someone
>>suggested using a flag bit somewhere... that'd be preferable.
>
>
> Ok, I'll add a ->flags member to mm_struct and just use one bit for
> the oom_notify value. Then if other users of mm_struct need flag
> bits for other things in the future they can all share ->flags. I'll
> rework my patches and repost shortly...

mm_struct already has what you want -- dumpable:2 -- if you just put
your bit in an adjacent bitfield, you'll be right.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
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/

\
 
 \ /
  Last update: 2006-04-28 07:06    [W:0.052 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site