alistair23-linux/arch/sh/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
..
adc.h
addrspace.h sh: nommu: use 32-bit phys mode. 2010-11-04 12:32:24 +09:00
alignment.h sh: Split out the unaligned counters and user bits. 2010-01-12 16:12:25 +09:00
asm-offsets.h
atomic-grb.h atomic: Provide atomic_{or,xor,and} 2015-07-27 14:06:24 +02:00
atomic-irq.h sh: Provide atomic_{or,xor,and} 2015-07-27 14:06:23 +02:00
atomic-llsc.h sh: Provide atomic_{or,xor,and} 2015-07-27 14:06:23 +02:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h sh: fix smp_store_mb for !SMP 2016-01-26 10:18:29 +02:00
bitops-grb.h
bitops-llsc.h
bitops-op32.h
bitops.h arch,sh: Convert smp_mb__*() 2014-04-18 14:20:44 +02:00
bl_bit.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
bl_bit_32.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
bl_bit_64.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
bug.h sh: Consolidate die definitions for trap handlers. 2012-06-14 14:18:51 +09:00
bugs.h
cache.h Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
cache_insns.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
cache_insns_32.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
cache_insns_64.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
cacheflush.h sh: Assume new page cache pages have dirty dcache lines. 2010-12-01 15:39:51 +09:00
checksum.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
checksum_32.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
clock.h sh: sh header sh_clk_ops rename 2012-03-12 22:19:10 +01:00
cmpxchg-grb.h sh: support 1 and 2 byte xchg 2016-01-12 20:47:01 +02:00
cmpxchg-irq.h sh: support 1 and 2 byte xchg 2016-01-12 20:47:01 +02:00
cmpxchg-llsc.h sh: move xchg_cmpxchg to a header by itself 2016-01-12 20:47:02 +02:00
cmpxchg-xchg.h sh: move xchg_cmpxchg to a header by itself 2016-01-12 20:47:02 +02:00
cmpxchg.h sh: support 1 and 2 byte xchg 2016-01-12 20:47:01 +02:00
device.h sh: Defer to asm-generic/device.h. 2012-01-13 16:27:38 +09:00
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma-register.h dmaengine: shdma: Add more register documentation 2014-07-09 10:55:57 +02:00
dma.h sh: Kill off MAX_DMA_ADDRESS leftovers. 2012-05-19 18:50:09 +09:00
dmabrg.h
dwarf.h sh: Optimise FDE/CIE lookup by using red-black trees 2010-02-08 11:29:15 +09:00
elf.h sh: Fix FDPIC binary loader 2013-01-11 21:02:57 +09:00
entry-macros.S
fb.h
fixmap.h sh: use generic fixmap.h 2014-01-23 16:36:54 -08:00
flat.h
fpu.h sh: move fpu_counter into ARCH specific thread_struct 2013-11-13 12:09:13 +09:00
freq.h
ftrace.h ftrace: Format MCOUNT_ADDR address as type unsigned long 2015-07-20 22:30:53 -04:00
futex-irq.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
futex.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
gpio.h sh: Remove unused sh_pfc_register_info() function 2013-01-25 09:24:30 +09:00
hardirq.h
hd64461.h
heartbeat.h
hugetlb.h mm/hugetlb: remove arch_prepare/release_hugepage from arch headers 2015-06-25 17:00:35 -07:00
hw_breakpoint.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
hw_irq.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
i2c-sh7760.h sh: edosk7760 evt2irq migration. 2012-05-18 14:52:31 +09:00
io.h libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
io_generic.h sh: machvec IO death. 2010-11-01 09:49:04 -04:00
io_noioport.h sh: fix build error by adding generic ioport_{map/unmap}() 2014-08-06 18:01:13 -07:00
io_trapped.h Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-04-07 16:36:11 -07:00
irq.h sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
Kbuild locking/rwsem, sh: Drop superfluous arch specific implementation 2016-04-13 10:42:19 +02:00
kdebug.h sh64: Convert to unwinder API. 2012-05-24 15:03:46 +09:00
kexec.h sh: convert kexec crash kernel management to LMB. 2010-05-07 14:54:55 +09:00
kgdb.h sh: kgdb: Unset CACHE_FLUSH_IS_SAFE for SMP. 2012-04-11 10:48:24 +09:00
kmap_types.h
kprobes.h sh: Add kprobe-based event tracer. 2010-06-14 15:16:53 +09:00
linkage.h
machvec.h Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-04-07 16:36:11 -07:00
mc146818rtc.h
mmu.h sh: Fix up NUMA build for 29-bit. 2010-03-10 16:29:48 +09:00
mmu_context.h Fix weird uses of num_online_cpus(). 2015-03-10 13:54:42 +10:30
mmu_context_32.h sh: Mass ctrl_in/outX to __raw_read/writeX conversion. 2010-01-26 12:58:40 +09:00
mmu_context_64.h
mmzone.h Fix node_start/end_pfn() definition for mm/page_cgroup.c 2011-06-27 14:13:09 -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-llsc.h arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not 2013-06-26 12:10:55 +02:00
mutex.h
page.h sh: add copy_user_page() alias for __copy_user() 2015-10-16 11:42:28 -07:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
perf_event.h irq_work: Add generic hardirq context callbacks 2010-10-18 19:58:50 +02: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-2level.h sh: Rename split-level pgtable headers. 2010-01-13 19:18:39 +09:00
pgtable-3level.h sh: Rename split-level pgtable headers. 2010-01-13 19:18:39 +09:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
pgtable_32.h sh: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:33 -08:00
pgtable_64.h sh: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:33 -08:00
posix_types.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
processor_32.h sh: move fpu_counter into ARCH specific thread_struct 2013-11-13 12:09:13 +09:00
processor_64.h sh: move fpu_counter into ARCH specific thread_struct 2013-11-13 12:09:13 +09:00
ptrace.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
ptrace_32.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
ptrace_64.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
push-switch.h
reboot.h sh: machine_ops based reboot support. 2010-01-20 16:42:52 +09:00
romimage-macros.h
rtc.h
seccomp.h
sections.h nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
segment.h sh: macro whitespace fixes 2015-01-13 15:24:08 +02:00
setup.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
sfp-machine.h
sh7760fb.h
sh_bios.h sh: Kill off more unused sh_bios callbacks. 2010-01-12 15:26:11 +09:00
shmparam.h
siu.h sh: remove unused DMA device pointer from SIU platform data 2012-07-20 11:23:44 +05:30
smc37c93x.h
smp-ops.h sh: CPU hotplug support. 2010-04-26 19:08:55 +09:00
smp.h sh: fix smp-shx3 build regression from removal of arch localtimer 2016-03-29 22:03:50 +00:00
sparsemem.h
spi.h
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
sram.h sh: Provide a generic SRAM pool for tiny memories. 2010-10-15 02:09:00 +09:00
stackprotector.h sh: initial stack protector support. 2012-04-19 15:45:57 +09:00
stacktrace.h sh: remove warning and warning_symbol from struct stacktrace_ops 2011-05-23 14:42:15 +09:00
string.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
string_32.h
string_64.h
suspend.h SH: cpuidle: check error code at init 2013-04-22 00:35:53 +02:00
switch_to.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
switch_to_32.h sched, sh: Fold finish_arch_switch() into switch_to() 2015-08-04 09:38:05 +02:00
switch_to_64.h Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
syscall.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
syscall_32.h SH: define syscall_get_arch() for superh 2014-09-23 16:20:01 -04:00
syscall_64.h SH: define syscall_get_arch() for superh 2014-09-23 16:20:01 -04:00
syscalls.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
syscalls_32.h sh: push extra copy of r0-r2 for syscall parameters 2014-04-03 16:20:52 -07:00
syscalls_64.h sh: switch to generic fork/vfork/clone 2012-11-28 22:36:47 -05:00
thread_info.h sh: Remove signal translation and exec_domain 2015-04-12 20:58:25 +02:00
timex.h sh: Only provide a PCLK definition for legacy CPG CPUs. 2009-12-29 11:09:30 +09:00
tlb.h mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts 2014-04-25 16:05:40 -07:00
tlb_64.h
tlbflush.h sh: Provide a global TLB flush for U/I-TLB clear. 2010-07-02 15:44:09 +09:00
topology.h sh: fix function signature of cpu_coregroup_mask to match pointer type 2016-03-30 00:47:49 +00:00
traps.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
traps_32.h sh: don't pass saved userspace state to exception handlers 2014-04-03 16:20:52 -07:00
traps_64.h sh64: Provide EXPEVT helper. 2012-05-14 13:04:08 +09:00
types.h UAPI: (Scripted) Disintegrate arch/sh/include/asm 2012-10-09 09:47:37 +01:00
uaccess.h sh/uaccess: fix sparse errors 2015-01-13 15:23:21 +02:00
uaccess_32.h sh: use the new generic strnlen_user() function 2012-06-13 10:28:37 +09:00
uaccess_64.h sh: fix put_user sparse errors 2015-01-13 15:23:38 +02:00
unaligned-sh4a.h Fix common misspellings 2011-03-31 11:26:23 -03:00
unaligned.h
uncached.h sh: nommu: Support building without an uncached mapping. 2010-11-04 12:46:19 +09:00
unistd.h sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
unwinder.h
user.h
vga.h
vmlinux.lds.h sh64: fix up memory offset calculation. 2010-02-12 15:41:45 +09:00
watchdog.h sh: Mass ctrl_in/outX to __raw_read/writeX conversion. 2010-01-26 12:58:40 +09:00
word-at-a-time.h sh: use the new generic strnlen_user() function 2012-06-13 10:28:37 +09:00