Re: [PATCH 05/10] mm, page_alloc: Remove unnecessary updating of GFP flags during normal operation

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

 



On Tue, Jul 28, 2015 at 03:36:05PM +0200, Vlastimil Babka wrote:
> >+static inline gfp_t gfp_allowed_mask(gfp_t gfp_mask)
> >+{
> >+	if (static_key_false(&gfp_restricted_key))
> 
> This is where it uses static_key_false()...

> >+struct static_key gfp_restricted_key __read_mostly = STATIC_KEY_INIT_TRUE;
> 
> ... and here it's combined with STATIC_KEY_INIT_TRUE. I've suspected that
> this is not allowed, which Peter confirmed on IRC.
> 
> It's however true that the big comment at the top of
> include/linux/jump_label.h only explicitly talks about combining
> static_key_false() and static_key_true().
> 
> I'm not sure what's the correct idiom for a default-false static key which
> however has to start as true on boot (Peter said such cases do exist)...

There currently isn't one. But see the patchset I just send to address
this:

  lkml.kernel.org/r/20150728132313.164884020@xxxxxxxxxxxxx

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