Re: [PATCH] Export current_is_keventd() for libphy

From: Linus Torvalds
Date: Wed Dec 06 2006 - 13:38:53 EST




On Wed, 6 Dec 2006, Linus Torvalds wrote:
>
> and remove the "volatile" from all the bitop accessor functions.

It might also be interesting to see if this would change code-size at all.

There's a number of things that check different bits in the same word
right now, and they just reload the word unnecessarily and do multiple
tests. Some of the page flags functions obviously already work around this
by doing horrible things by hand instead, eg:

(page->flags & (
1 << PG_lru |
1 << PG_private |
1 << PG_locked |
1 << PG_active |
1 << PG_reclaim |
1 << PG_slab |
1 << PG_swapcache |
1 << PG_writeback |
1 << PG_reserved |
1 << PG_buddy ))

in the free_pages_check() thing. It may make sense there, but we really
_should_ allow gcc to just do things like this for us, and just use the
proper functions to test bits.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/