Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting jump label

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

 



On Mon, Nov 30, 2015 at 05:28:49PM -0500, Jason Baron wrote:
> On 11/30/2015 04:50 PM, Johannes Weiner wrote:
> > On Mon, Nov 30, 2015 at 04:08:18PM -0500, Jason Baron wrote:
> >> We're trying to move to the updated API, so this should be:
> >> static_branch_unlikely(&memcg_sockets_enabled_key)
> >>
> >> see: include/linux/jump_label.h for details.
> > 
> > Good point. There is another struct static_key in there as well. How
> > about the following on top of this series?
> > 
> 
> Looks fine - you may be able to make use of
> 'static_branch_enable()/disable()' instead of the inc()/dec() to simply
> set the branch direction, if you think its more readable. Although I
> didn't look to see if it would be racy here.

Thanks!

We actually need the reference counting semantics for both these keys.
It counts the number of active cgroups in existence that require the
code behind those static branches.

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