linux/arch/arm/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
..
hardware ARM: uniphier: add outer cache support 2015-10-27 09:20:50 +09:00
mach ARM: implement create_mapping_late() for EFI use 2015-12-13 19:18:29 +01:00
xen xen: features and fixes for 4.6-rc0 2016-03-22 12:55:17 -07:00
arch_gicv3.h irqchip/gic-v3: Add missing barrier to 32bit version of gic_read_iar() 2016-02-18 19:15:45 +00:00
arch_timer.h clocksource: arch_timer: Fix code to use physical timers when requested 2014-12-04 23:30:26 -08:00
arm-cci.h arm-cci: Get rid of secure transactions for PMU driver 2015-03-27 13:44:35 +00:00
asm-offsets.h
assembler.h Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-14 12:24:10 -07:00
atomic.h ARM, locking/atomics: Implement _relaxed variants of atomic[64]_{inc,dec} 2015-10-20 10:17:23 +02:00
auxvec.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
barrier.h arm: define __smp_xxx 2016-01-12 20:46:54 +02:00
bitops.h ARM: 8417/1: refactor bitops functions with BIT_MASK() and BIT_WORD() 2015-08-18 14:00:30 +01:00
bitrev.h ARM: 8287/1: add bitrev.h file to support rbit instruction 2015-01-16 14:06:18 +00:00
bL_switcher.h ARM: bL_switcher: Add query interface to discover CPU affinities 2013-09-23 18:47:31 -04:00
bug.h ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG 2015-12-03 00:02:29 +00:00
bugs.h
cache.h
cacheflush.h asm-generic: Consolidate mark_rodata_ro() 2016-02-22 08:51:37 +01:00
cachetype.h
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 ARM: 8443/1: Adding support for atomic half word exchange 2015-10-09 16:22:54 +01:00
compiler.h ARM: 8300/1: teach __asmeq that r11 == fp and r12 == ip 2015-02-10 10:23:11 +00:00
cp15.h ARM: remove global cr_no_alignment 2014-06-02 09:20:18 +01:00
cpu.h
cpuidle.h ARM: cpuidle: add const qualifier to cpuidle_ops member in structures 2016-04-20 06:59:10 +02:00
cputype.h ARM: 8564/1: fix cpu feature extracting helper 2016-04-19 19:42:26 +01:00
cti.h
dcc.h ARM: tty: Move HVC DCC assembly to arch/arm 2014-05-28 13:33:18 -07:00
delay.h
device.h arm: introduce is_device_dma_coherent 2014-12-04 12:41:50 +00:00
div64.h ARM: 8504/1: __arch_xprod_64(): small optimization 2016-02-11 15:33:37 +00:00
dma-contiguous.h drivers: dma-contiguous: clean source code and prepare for device tree 2013-08-27 09:18:29 +02:00
dma-iommu.h ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops 2015-05-03 23:21:55 +01:00
dma-mapping.h Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-05-20 10:01:38 -07:00
dma.h remove <asm/scatterlist.h> 2015-05-05 13:35:39 -06:00
domain.h ARM: 8573/1: domain: move {set,get}_domain under config guard 2016-05-05 19:03:02 +01:00
ecard.h
edac.h EDAC: Cleanup atomic_scrub mess 2015-05-28 15:31:53 +02:00
efi.h arm/efi: Enable runtime call flag checking 2016-04-28 11:34:12 +02:00
elf.h Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
entry-macro-multi.S ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
exception.h arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
fb.h
fiq.h
firmware.h ARM: EXYNOS: add exynos_get_boot_addr() helper 2015-06-06 02:17:56 +09:00
fixmap.h ARM: add support for generic early_ioremap/early_memremap 2015-12-13 19:18:28 +01:00
flat.h
floppy.h ARM: 7996/1: floppy.h: remove deprecated IRQF_DISABLED 2014-03-12 10:32:29 +00:00
fncpy.h
fpstate.h
ftrace.h ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h 2014-09-26 14:40:03 +01:00
futex.h ARM: uaccess: provide uaccess_save_and_enable() and uaccess_restore() 2015-08-25 16:14:43 +01:00
glue-cache.h ARM: reduce visibility of dmac_* functions 2015-08-01 22:25:04 +01:00
glue-df.h ARM: 8065/1: remove last use of CONFIG_CPU_ARM710 2014-05-30 01:12:30 +01:00
glue-pf.h
glue-proc.h ARM: 8103/1: save/restore Cortex-A9 CP15 registers on suspend/resume 2014-07-18 12:29:37 +01:00
glue.h
gpio.h ARM: delete old reference to ARM_GPIOLIB_COMPLEX 2014-06-30 21:37:39 +02:00
hardirq.h ARM: 8487/1: Remove IPI_CALL_FUNC_SINGLE 2015-12-22 12:09:43 +00:00
highmem.h kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlb-3level.h ARM: mm: HugeTLB support for LPAE systems. 2013-06-04 16:52:37 +01:00
hugetlb.h mm/hugetlb: remove arch_prepare/release_hugepage from arch headers 2015-06-25 17:00:35 -07:00
hw_breakpoint.h ARM: 7948/1: hw_breakpoint: Add ARMv8 support 2014-02-10 11:48:05 +00:00
hw_irq.h ARM: Remove ununsed set_irq_flags 2015-09-16 16:53:39 +02:00
hwcap.h ARM: 7981/1: add support for AT_HWCAP2 ELF auxv entry 2014-02-25 11:40:48 +00:00
hypervisor.h
ide.h
idmap.h ARM: KVM: move to a KVM provided HYP idmap 2013-04-28 22:23:08 -07:00
insn.h ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
io.h ARM: memremap: implement arch_memremap_wb() 2016-04-04 10:26:42 +02:00
irq_work.h arm: Tell irq work about self IPI support 2014-09-13 18:38:39 +02:00
irq.h xen/events: Always allocate legacy interrupts on PV guests 2015-11-26 18:05:01 +00:00
irqflags.h ARM: 8422/1: enable imprecise aborts during early kernel startup 2015-09-22 08:13:56 +01:00
jump_label.h locking/static_keys: Add a new static_key interface 2015-08-03 11:34:15 +02:00
Kbuild ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
kexec.h
kgdb.h ARM: kdgb: use <asm/opcodes.h> for data to be assembled as intruction 2013-10-19 20:46:35 +01:00
kmap_types.h
kprobes.h ARM: optprobes: execute instruction during restoring if possible. 2015-01-14 12:24:52 +00:00
kvm_arm.h arm64: KVM: Add support for 16-bit VMID 2015-12-18 10:15:12 +00:00
kvm_asm.h arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00
kvm_coproc.h
kvm_emulate.h arm/arm64: KVM: Handle out-of-RAM cache maintenance as a NOP 2016-02-29 18:34:15 +00:00
kvm_host.h - move kvm_stat tool from QEMU repo into tools/kvm/kvm_stat 2016-05-27 13:41:54 -07:00
kvm_hyp.h ARM: KVM: Use common version of timer-sr.c 2016-02-29 18:34:19 +00:00
kvm_mmio.h KVM: arm/arm64: Export mmio_read/write_bus 2016-05-20 15:39:42 +02:00
kvm_mmu.h Small release overall. 2016-05-19 11:27:09 -07:00
kvm_psci.h ARM/ARM64: KVM: Make kvm_psci_call() return convention more flexible 2014-04-30 04:18:57 -07:00
limits.h
linkage.h
mach-types.h
mc146818rtc.h
mcpm.h ARM: MCPM: remove residency argument from mcpm_cpu_suspend() 2015-05-06 11:47:10 -04:00
mcs_spinlock.h ARM: 8098/1: mcs lock: implement wfe-based polling for MCS locking 2014-07-18 12:29:35 +01:00
memblock.h ARM: 8025/1: Get rid of meminfo 2014-06-01 01:17:12 +01:00
memory.h ARM: provide arm_has_idmap_alias() helper 2016-05-03 11:17:28 +01:00
mmu_context.h ARM: Hide finish_arch_post_lock_switch() from modules 2016-05-13 16:12:53 +02:00
mmu.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
module.h ARM: 8220/1: allow modules outside of bl range 2015-05-08 10:42:34 +01:00
mpu.h ARM: mpu: protect the vectors page with an MPU region 2013-06-17 15:13:18 +01:00
mtd-xip.h
mutex.h
neon.h ARM: add support for kernel mode NEON 2013-07-08 22:08:51 +01:00
nwflash.h
opcodes-sec.h
opcodes-virt.h
opcodes.h
outercache.h ARM: move heavy barrier support out of line 2015-07-25 15:28:05 +01:00
page-nommu.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
page.h ARM: make vectors page inaccessible from userspace 2013-08-01 14:31:58 +01:00
paravirt.h arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops 2015-12-21 14:40:54 +00:00
patch.h ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h ARM: 8174/1: Use global stack register variable for percpu 2014-11-13 23:58:06 +00:00
perf_event.h arm: perf: Fix callchain parse error with kernel tracepoint events 2015-05-27 16:12:05 +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-2level-hwdef.h ARM: domains: keep vectors in separate domain 2015-08-21 13:55:53 +01:00
pgtable-2level-types.h
pgtable-2level.h ARM: 8578/1: mm: ensure pmd_present only checks the valid bit 2016-06-09 17:51:47 +01:00
pgtable-3level-hwdef.h ARM: 8235/1: Support for the PXN CPU feature on ARMv7 2014-12-03 15:57:45 +00:00
pgtable-3level-types.h
pgtable-3level.h ARM: 8579/1: mm: Fix definition of pmd_mknotpresent 2016-06-09 17:51:47 +01:00
pgtable-hwdef.h
pgtable-nommu.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
pgtable.h ARM: 8578/1: mm: ensure pmd_present only checks the valid bit 2016-06-09 17:51:47 +01:00
probes.h ARM: optprobes: execute instruction during restoring if possible. 2015-01-14 12:24:52 +00:00
proc-fns.h ARM: redo TTBR setup code for LPAE 2015-06-01 23:48:19 +01:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
procinfo.h
prom.h of/fdt: move memreserve and dtb memory reservations into core 2014-04-30 00:59:17 -05:00
psci.h ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
ptrace.h ARM: 8175/1: Use current_stack_pointer to calculate pt_regs address 2014-11-13 23:58:07 +00:00
sections.h ARM: 8518/1: Use correct symbols for XIP_KERNEL 2016-02-11 15:43:14 +00:00
setup.h ARM: 8495/1: ATAGS: move save_atags() to arch/arm/include/asm/setup.h 2016-01-04 11:26:00 +00:00
shmparam.h
signal.h
smp_plat.h ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable 2015-07-31 18:58:30 +01:00
smp_scu.h ARM: make it easier to check the CPU part number correctly 2014-07-18 12:29:02 +01:00
smp_twd.h
smp.h ARM: 8423/1: add const qualifier to smp_operations member in structures 2015-09-22 08:13:57 +01:00
sparsemem.h ARM: 8411/1: Add default SPARSEMEM settings 2016-02-16 16:35:21 +00:00
spinlock_types.h ARM: locks: prefetch the destination word for write prior to strex 2013-09-30 16:42:55 +01:00
spinlock.h arm/spinlock: Replace ACCESS_ONCE with READ_ONCE 2014-12-18 09:54:40 +01:00
stackprotector.h
stacktrace.h ARM: 8070/1: Introduce arm_get_current_stack_frame() 2014-07-18 12:29:11 +01:00
stage2_pgtable.h kvm-arm: arm32: Introduce stage2 page table helpers 2016-04-21 14:57:26 +02:00
string.h
suspend.h ARM: 8389/1: Add cpu_resume_arm() for firmwares that resume in ARM state 2015-06-12 21:17:17 +01:00
swab.h
switch_to.h sched, arm: Remove finish_arch_switch() 2015-08-04 09:37:52 +02:00
sync_bitops.h ARM: 7989/1: Delete asm/system.h 2014-02-25 11:33:37 +00:00
syscall.h ARM: 8152/1: Convert pr_warning to pr_warn 2014-09-26 14:39:53 +01:00
system_info.h ARM: 8355/1: arch: Show the serial number from devicetree in cpuinfo 2015-05-08 10:42:35 +01:00
system_misc.h reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
tcm.h
therm.h
thread_info.h Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-14 12:24:10 -07:00
thread_notify.h
timex.h ARM: drop <mach/timex.h> for !ARCH_MULTIPLATFORM, too 2013-12-20 17:17:16 +01:00
tlb.h arm: mm: enable HAVE_RCU_TABLE_FREE logic 2014-10-09 22:26:01 -04:00
tlbflush.h ARM: 7855/1: Add check for Cortex-A15 errata 798181 ECO 2013-10-29 11:06:13 +00:00
tls.h ARM: 8178/1: fix set_tls for !CONFIG_KUSER_HELPERS 2014-09-30 16:55:23 +01:00
topology.h sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
traps.h
trusted_foundations.h ARM: trusted_foundations: fix compile error on non-SMP 2014-05-23 21:28:11 +02:00
types.h ARM: 7822/1: add workaround for ambiguous C99 stdint.h types 2013-08-25 17:09:46 +01:00
uaccess.h ARM: fix uaccess_with_memcpy() with SW_DOMAIN_PAN 2015-12-15 11:51:02 +00:00
ucontext.h
unified.h ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
unistd.h ARM: wire up preadv2 and pwritev2 syscalls 2016-04-07 21:57:02 +01:00
unwind.h
uprobes.h ARM: add uprobes support 2014-03-18 16:39:40 -04:00
user.h
v7m.h ARM: 7828/1: ARMv7-M: implement restart routine common to all v7-M machines 2013-09-02 13:49:29 +01:00
vdso_datapage.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
vdso.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
vfp.h ARM: vfp: Add vfp_disable for problematic platforms 2015-05-20 15:07:00 -07:00
vfpmacros.h
vga.h
virt.h arm/arm64: Add new is_kernel_in_hyp_mode predicate 2016-02-29 18:34:16 +00:00
word-at-a-time.h ARM: 8322/1: keep .text and .fixup regions closer together 2015-03-29 23:11:56 +01:00
xor.h ARM: crypto: add NEON accelerated XOR implementation 2013-07-08 22:09:06 +01:00