lkml.org 
[lkml]   [2016]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 02/18] cgroup_pids: track maximum pids
From
Date
On 06/13/16 21:33, Tejun Heo wrote:
> Hello,
>
> On Mon, Jun 13, 2016 at 09:29:32PM +0000, Topi Miettinen wrote:
>> I used fork callback as I don't want to lower the watermark in all cases
>> where the charge can be lowered, so I'd update the watermark only when
>> the fork really happens.
>
> I don't think that would make a noticeable difference. That's where
> we decide whether to grant fork or not after all and thus where the
> actual usage is.
>

You mean, increment count on cgroup_can_fork()? But what if the fork()
fails after that (signal_pending case)?

>> Is there a better way to compare and set? I don't think atomic_cmpxchg()
>> does what's needed,
>
> cmpxchg loop should do what's necessary although I'm not sure how much
> being strictly correct matters here.
>
> Thanks.
>

These are not used for any decisions taken by kernel, but by the user. I
have to say I don't know where's the line between strict correctness and
less strict.

-Topi

\
 
 \ /
  Last update: 2016-06-14 00:41    [W:0.215 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site