alistair23-linux/arch/parisc/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
..
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
asmregs.h
assembly.h parisc: Use generic extable search and sort routines 2016-03-23 16:00:46 +01:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
bitops.h arch,parisc: Convert smp_mb__*() 2014-04-18 14:20:41 +02:00
bug.h [PARISC] fix missing TAINT_WARN problem 2012-06-05 14:10:17 +09:00
bugs.h
cache.h arch: Introduce post-init read-only memory 2016-02-22 08:51:38 +01:00
cacheflush.h asm-generic: Consolidate mark_rodata_ro() 2016-02-22 08:51:37 +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 parisc: Add native high-resolution sched_clock() implementation 2016-05-22 21:39:25 +02:00
compat.h parisc: Fix SIGSYS signals in compat case 2016-03-31 12:28:37 +02:00
compat_ucontext.h
current.h
delay.h parisc: make udelay() SMP-safe 2013-11-07 22:28:26 +01:00
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h Disintegrate asm/system.h for PA-RISC 2012-03-28 18:30:02 +01:00
eisa_bus.h
eisa_eeprom.h parisc: Fix typos in eisa_eeprom.h 2016-05-22 21:57:40 +02:00
elf.h parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures 2015-05-12 22:03:44 +02:00
fb.h
fixmap.h parisc: rename parisc's vmalloc_start to parisc_vmalloc_start 2009-09-27 23:27:04 -04:00
floppy.h parisc: Use parentheses around expression in floppy.h 2016-03-01 22:51:04 +01:00
ftrace.h parisc: Add syscall tracepoint support 2016-05-22 21:38:47 +02:00
futex.h parisc: Update futex.h to match generic implementation 2016-05-22 21:48:54 +02:00
grfioctl.h
hardirq.h parisc: do not count IPI calls twice 2013-11-07 22:28:54 +01:00
hardware.h parisc: drop include of asm/pdc.h from asm/hardware.h 2012-05-10 15:12:08 -07:00
hugetlb.h parisc: Protect huge page pte changes with spinlocks 2016-01-16 19:19:14 +01:00
ide.h
io.h parisc: Define ioremap_uc and ioremap_wc 2015-09-08 15:30:37 +02:00
irq.h [PARISC] Convert to new irq_chip functions 2011-02-10 10:22:14 -06:00
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
kbdleds.h keyboard: Use BIOS Keyboard variable to set Numlock 2012-05-08 14:19:41 -07:00
Kbuild mm: clean up per architecture MM hook header files 2015-07-17 16:39:53 -07:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
ldcw.h parisc: Fix typo in ldcw.h 2016-05-22 21:56:37 +02:00
led.h
linkage.h
machdep.h
mc146818rtc.h
mckinley.h
mmu.h
mmu_context.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
mmzone.h parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2) 2013-06-18 20:20:21 +02:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
page.h parisc: Add defines for Huge page support 2015-11-22 12:22:34 +01:00
parisc-device.h parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
parport.h ARCH: 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
pdc.h parisc: Imporove debug info about space registers and TLB configuration 2016-01-12 22:12:09 +01:00
pdc_chassis.h
pdcpat.h
perf.h
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.h parisc: Disable huge pages on Mako machines 2015-12-12 16:45:23 +01:00
prefetch.h [PARISC] fix panic on prefetch(NULL) on PA7300LC 2012-05-16 13:15:21 +01:00
processor.h parisc: Reduce overhead of parisc_requires_coherency() 2016-01-12 22:03:36 +01:00
psw.h Disintegrate asm/system.h for PA-RISC 2012-03-28 18:30:02 +01:00
ptrace.h parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
ropes.h
rt_sigframe.h
rtc.h
runway.h
sections.h
serial.h parisc: remove empty SERIAL_PORT_DFNS in serial.h 2013-11-30 21:02:18 +01:00
shmparam.h parisc: change value of SHMLBA from 0x00400000 to PAGE_SIZE 2014-04-13 15:00:53 +02:00
signal.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-02-23 18:50:11 -08:00
smp.h [PARISC] Fix parisc compile failure after smp: Add task_struct argument to __cpu_up() 2012-05-25 12:35:45 +01:00
socket.h parisc: break out SOCK_NONBLOCK define to own asm header file 2013-11-19 23:36:17 +01:00
special_insns.h parisc: optimize mtsp(0,sr) inline assembly 2013-07-09 22:09:21 +02:00
spinlock.h parisc: locks: remove redundant arch_*_relax operations 2014-03-23 17:01:23 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
string.h
superio.h
switch_to.h Disintegrate asm/system.h for PA-RISC 2012-03-28 18:30:02 +01:00
syscall.h parisc: Add syscall tracepoint support 2016-05-22 21:38:47 +02:00
termios.h UAPI: (Scripted) Disintegrate arch/parisc/include/asm 2012-10-16 21:28:05 +01:00
thread_info.h parisc: Add syscall tracepoint support 2016-05-22 21:38:47 +02:00
timex.h Disintegrate asm/system.h for PA-RISC 2012-03-28 18:30:02 +01:00
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h parisc: Fix some PTE/TLB race conditions and optimize __flush_tlb_range based on timing results 2015-07-10 21:47:47 +02:00
traps.h parisc: Move die_if_kernel() prototype into traps.h header 2016-06-05 08:49:01 +02:00
uaccess.h parisc: Add 64bit get_user() and put_user() for 32bit kernel 2016-05-22 21:39:04 +02:00
ucontext.h
unaligned.h
unistd.h sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
unwind.h