Re: [PATCH] mm: wrap BUG() branches with unlikely()

2015-01-13 Thread Andrew Morton
On Tue, 13 Jan 2015 01:35:26 +0300 Dmitry Voytik wrote: > Wrap BUG() branches with unlikely() where it is possible. Use BUG_ON() > instead of "if () BUG();" where it is feasible. Does this actually do anything? With my (old) gcc, mm/built-in.o's size was unaltered. I didn't check for code gene

[PATCH] mm: wrap BUG() branches with unlikely()

2015-01-12 Thread Dmitry Voytik
Wrap BUG() branches with unlikely() where it is possible. Use BUG_ON() instead of "if () BUG();" where it is feasible. Signed-off-by: Dmitry Voytik --- mm/bootmem.c| 6 +++--- mm/filemap.c| 2 +- mm/huge_memory.c| 4 ++-- mm/memory.c | 3 ++- mm/memory_hotplug.c |