linux/arch/alpha/include/asm
Michal Hocko 32d6bd9059 tree wide: get rid of __GFP_REPEAT for order-0 allocations part I
This is the third version of the patchset previously sent [1].  I have
basically only rebased it on top of 4.7-rc1 tree and dropped "dm: get
rid of superfluous gfp flags" which went through dm tree.  I am sending
it now because it is tree wide and chances for conflicts are reduced
considerably when we want to target rc2.  I plan to send the next step
and rename the flag and move to a better semantic later during this
release cycle so we will have a new semantic ready for 4.8 merge window
hopefully.

Motivation:

While working on something unrelated I've checked the current usage of
__GFP_REPEAT in the tree.  It seems that a majority of the usage is and
always has been bogus because __GFP_REPEAT has always been about costly
high order allocations while we are using it for order-0 or very small
orders very often.  It seems that a big pile of them is just a
copy&paste when a code has been adopted from one arch to another.

I think it makes some sense to get rid of them because they are just
making the semantic more unclear.  Please note that GFP_REPEAT is
documented as

* __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt

* _might_ fail.  This depends upon the particular VM implementation.
  while !costly requests have basically nofail semantic.  So one could
  reasonably expect that order-0 request with __GFP_REPEAT will not loop
  for ever.  This is not implemented right now though.

I would like to move on with __GFP_REPEAT and define a better semantic
for it.

  $ git grep __GFP_REPEAT origin/master | wc -l
  111
  $ git grep __GFP_REPEAT | wc -l
  36

So we are down to the third after this patch series.  The remaining
places really seem to be relying on __GFP_REPEAT due to large allocation
requests.  This still needs some double checking which I will do later
after all the simple ones are sorted out.

I am touching a lot of arch specific code here and I hope I got it right
but as a matter of fact I even didn't compile test for some archs as I
do not have cross compiler for them.  Patches should be quite trivial to
review for stupid compile mistakes though.  The tricky parts are usually
hidden by macro definitions and thats where I would appreciate help from
arch maintainers.

[1] http://lkml.kernel.org/r/1461849846-27209-1-git-send-email-mhocko@kernel.org

This patch (of 19):

__GFP_REPEAT has a rather weak semantic but since it has been introduced
around 2.6.12 it has been ignored for low order allocations.  Yet we
have the full kernel tree with its usage for apparently order-0
allocations.  This is really confusing because __GFP_REPEAT is
explicitly documented to allow allocation failures which is a weaker
semantic than the current order-0 has (basically nofail).

Let's simply drop __GFP_REPEAT from those places.  This would allow to
identify place which really need allocator to retry harder and formulate
a more specific semantic for what the flag is supposed to do actually.

Link: http://lkml.kernel.org/r/1464599699-30131-2-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com> [for tile]
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: John Crispin <blogic@openwrt.org>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-24 17:23:52 -07:00
..
a.out-core.h
a.out.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
agp_backend.h
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h arch: Cleanup read_barrier_depends() and comments 2014-12-11 21:15:05 -05:00
bitops.h arch,alpha: Convert smp_mb__*() to the asm-generic primitives 2014-04-18 11:40:31 +02:00
bug.h alpha: Convert BUG() to use unreachable() 2009-12-18 01:14:52 -05:00
bugs.h
cache.h alpha: remove homegrown L1_CACHE_ALIGN macro 2010-08-31 22:45:31 -04:00
cacheflush.h mm: Fix out-of-date comments which refers non-existent functions 2011-02-17 16:54:39 +01:00
checksum.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
cmpxchg.h arch: Remove __ARCH_HAVE_CMPXCHG 2015-05-13 10:55:42 +02:00
compiler.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
console.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
core_apecs.h
core_cia.h
core_irongate.h
core_lca.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_marvel.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_mcpcia.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_polaris.h
core_t2.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_titan.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_tsunami.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_wildfire.h
current.h
delay.h
device.h
div64.h
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h
elf.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
emergency-restart.h
err_common.h
err_ev6.h
err_ev7.h
fb.h
floppy.h alpha: irq: remove deprecated use of IRQF_DISABLED 2013-04-07 12:59:30 -07:00
fpu.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
ftrace.h tracing: make CALLER_ADDRx overwriteable 2009-03-02 16:49:37 -05:00
futex.h alpha: fix 32/64-bit bug in futex support 2012-03-05 15:49:43 -08:00
gct.h
hardirq.h alpha: convert to asm-generic/hardirq.h 2009-09-22 07:17:43 -07:00
hw_irq.h alpha: add performance monitor interrupt counter 2010-08-09 20:45:03 -07:00
hwrpb.h
io_trivial.h
io.h alpha: io: define ioremap_uc 2015-09-17 21:16:07 -07:00
irq_regs.h
irq.h alpha: kill off alpha_do_IRQ 2011-01-17 05:42:13 +01:00
irqflags.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
jensen.h
Kbuild mm: clean up per architecture MM hook header files 2015-07-17 16:39:53 -07:00
kdebug.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
machvec.h alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
mc146818rtc.h
mce.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
mmu_context.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
mmu.h
mmzone.h mm/ALPHA: clean up unused VALID_PAGE() 2013-07-03 16:07:39 -07:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h
page.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
pal.h alpha: Use qemu+cserve provided high-res clock and alarm. 2013-11-16 16:33:21 -08:00
param.h alpha: Force the user-visible HZ to a constant 1024. 2013-07-19 13:54:26 -07:00
parport.h ALPHA: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h alpha: fix percpu build breakage 2009-06-30 18:55:59 -07:00
perf_event.h perf, arch: Cleanup perf-pmu init vs lockup-detector 2010-11-26 15:14:56 +01:00
pgalloc.h tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
processor.h alpha: forward declare struct pt_regs in processor.h 2015-04-17 09:03:53 -04:00
ptrace.h alpha: Enable system-call auditing support. 2014-01-31 09:21:55 -08:00
rtc.h alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
rwsem.h locking/rwsem, alpha: Provide __down_write_killable() 2016-04-13 10:42:21 +02:00
segment.h
serial.h serial: Fix ASYNC_* => UPF_* flags misuse 2016-01-28 14:17:42 -08:00
sfp-machine.h
shmparam.h
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h Remove unused PROC_CHANGE_PENALTY constant 2011-05-25 08:39:43 -07:00
socket.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
special_insns.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF. 2015-08-30 18:01:16 -07:00
string.h alpha: Eliminate compiler warning from memset macro 2013-11-16 16:33:09 -08:00
switch_to.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
syscall.h Alpha: define syscall_get_arch() 2014-09-23 16:20:03 -04:00
termios.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
thread_info.h arch: Remove exec_domain from remaining archs 2015-04-12 21:03:30 +02:00
timex.h
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h alpha: switch to dynamic percpu allocator 2009-06-24 15:13:52 +09:00
topology.h alpha: cpumask_of_node() should handle -1 as a node 2010-01-14 13:21:35 -05:00
types.h alpha: Remove #include <uapi/asm/types.h> from <asm/types.h> 2015-05-26 10:01:45 -07:00
uaccess.h alpha/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
ucontext.h
unaligned.h
unistd.h alpha: Wire up all missing implemented syscalls 2015-05-26 10:01:50 -07:00
user.h
vga.h
word-at-a-time.h word-at-a-time.h: support zero_bytemask() on alpha and tile 2015-10-06 14:53:16 -04:00
wrperfmon.h alpha: add wrperfmon.h header file to aid use of wrperfmon PALcall 2010-08-09 20:45:04 -07:00
xchg.h alpha: fix build failures from system.h dismemberment 2012-04-13 13:15:16 -04:00
xor.h