linux/arch/m68k/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
..
Kbuild mm: clean up per architecture MM hook header files 2015-07-17 16:39:53 -07:00
MC68EZ328.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
MC68VZ328.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
MC68328.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
a.out-core.h
adb_iop.h
amigahw.h m68k/UAPI: Move Amiga model/chipset definitions to <asm/bootinfo-amiga.h> 2013-11-26 11:09:17 +01:00
amigaints.h
amigayle.h m68k: amiga - Amiga Gayle IDE platform device conversion 2010-05-26 19:51:09 +02:00
amipcmcia.h
apollohw.h m68k/UAPI: Move Apollo model definitions to <asm/bootinfo-apollo.h> 2013-11-26 11:09:18 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atafd.h
atafdreg.h
atari_joystick.h
atari_stdma.h atari_scsi: Fix atari_scsi deadlocks on Falcon 2014-11-20 09:11:13 +01:00
atari_stram.h m68k/atari - stram: alloc ST-RAM pool even if kernel not in ST-RAM 2014-05-26 22:41:24 +02:00
atarihw.h m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h 2013-11-26 11:09:15 +01:00
atariints.h m68k/atari: Remove obsolete IRQ_TYPE_* 2015-01-15 13:44:51 +01:00
atarikb.h input/atari: Use the correct mouse interrupt hook 2011-05-19 18:19:11 +02:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
bitops.h arch,m68k: Convert smp_mb__*() 2014-04-18 14:20:37 +02:00
blinken.h m68k/hp300: Export hp300_ledstate 2011-12-10 19:52:48 +01:00
bootinfo.h m68k: Add support to export bootinfo in procfs 2013-12-08 11:01:48 +01:00
bootstd.h Fix common misspellings 2011-03-31 11:26:23 -03:00
bug.h
bugs.h
bvme6000hw.h
cache.h dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
cacheflush.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
cacheflush_mm.h m68k: fix ColdFire clear cache operation 2012-07-17 15:49:34 +10:00
cacheflush_no.h m68knommu: use "r", not "i" constraint in cacheflush asm's 2012-09-27 23:28:40 +10: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
coldfire.h m68knommu: force setting of CONFIG_CLOCK_FREQ for ColdFire 2015-07-13 09:34:39 +10:00
contregs.h
current.h
delay.h m68k: Implement ndelay() based on the existing udelay() logic 2013-04-16 21:35:40 +02:00
div64.h m68k: Truncate base in do_div() 2013-08-14 11:46:30 +02:00
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h m68knommu: create and use a common M53xx ColdFire class of CPUs 2013-04-29 09:17:58 +10:00
dsp56k.h
dvma.h
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
entry.h m68k: Correct the Atari ALLOWINT definition 2012-04-22 20:16:50 +02:00
fb.h
fbio.h tree-wide: s/widht/width/g typo in comments 2010-02-05 12:22:42 +01:00
flat.h m68k: fix compiler warning by properly inlining flat_set_persistent() 2012-05-20 21:21:33 +10:00
floppy.h m68k: Remove deprecated IRQF_DISABLED 2013-09-26 09:54:16 +02:00
fpu.h m68k: add ColdFire FPU support for the V4e ColdFire CPUs 2011-12-30 10:20:47 +10:00
ftrace.h
gpio.h m68k: only use local gpio_request_one if not using GPIOLIB 2013-05-29 16:56:45 +10:00
hardirq.h hardirq: Make hardirq bits generic 2013-11-13 20:21:46 +01:00
hash.h m68k: Add <asm/hash.h> 2016-05-28 15:48:57 -04:00
hp300hw.h m68k/UAPI: Move HP300 model definitions to <asm/bootinfo-hp300.h> 2013-11-26 11:09:19 +01:00
hwtest.h
ide.h m68knommu: arch/m68k/include/asm/ide.h fix for nommu 2010-08-18 12:44:31 +10:00
idprom.h
intersil.h
io.h m68k: io: implement dummy relaxed accessor macros for writes 2014-10-20 18:49:18 +01:00
io_mm.h Linux 4.2-rc8 2015-08-25 09:59:19 +02:00
io_no.h video/fbdev, asm/io.h: Remove ioremap_writethrough() 2015-06-07 15:28:57 +02:00
irq.h genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
irqflags.h sched/preempt: Merge preempt_mask.h into preempt.h 2015-05-19 08:39:11 +02:00
kexec.h m68k: Add kexec support 2013-12-08 11:01:47 +01:00
linkage.h m68k: Define asmlinkage_protect 2015-09-28 09:59:45 +02:00
m52xxacr.h m68knommu: create optimal separate instruction and data cache for ColdFire 2011-01-05 15:19:20 +10:00
m53xxacr.h m68knommu: create and use a common M53xx ColdFire class of CPUs 2013-04-29 09:17:58 +10:00
m53xxsim.h m68knommu: fix ColdFire 5373/5329 QSPI base address 2013-04-29 09:17:59 +10:00
m54xxacr.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
m54xxgpt.h m68knommu: clean up ColdFire 54xx General Timer definitions 2012-09-27 23:34:03 +10:00
m54xxpci.h m68k: Fix typo 'COFNIG_MBAR' 2014-09-29 09:56:19 +10:00
m54xxsim.h m68knommu: Implement gpio support for m54xx. 2014-05-26 13:28:38 +10:00
m520xsim.h m68knommu: Add clk definitions for m520x. 2012-07-16 09:59:22 +10:00
m523xsim.h m68knommu: fix inconsistent formating in ColdFire 523x definitions 2012-09-27 23:34:04 +10:00
m525xsim.h m68knommu: Fix the 5249/525x qspi base address. 2014-05-26 13:28:37 +10:00
m527xsim.h m68knommu: ColdFire 5271 only has a single FEC controller 2015-03-30 09:52:24 +10:00
m528xsim.h m68knommu: remove unused ColdFire 5282 register definitions 2012-09-27 23:33:55 +10:00
m5206sim.h m68knommu: make ColdFire Chip Select register definitions absolute addresses 2012-09-27 23:33:51 +10:00
m5272sim.h m68knommu: fix inconsistent formating in ColdFire 5272 definitions 2012-09-27 23:34:05 +10:00
m5307sim.h m68knommu: fix inconsistent formating in ColdFire 5307 definitions 2012-09-27 23:34:07 +10:00
m5407sim.h m68knommu: fix inconsistent formating in ColdFire 5407 definitions 2012-09-27 23:34:08 +10:00
m5441xsim.h m68knommu: Add rtc device for m5441x. 2012-07-16 09:59:21 +10:00
mac_asc.h
mac_baboon.h m68k/mac: cleanup forward declarations 2011-12-10 19:52:46 +01:00
mac_iop.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
mac_oss.h m68k/mac: oss irq fixes 2011-12-10 19:52:47 +01:00
mac_psc.h m68k/mac: Kill psc_present 2015-11-23 09:58:30 +01:00
mac_via.h genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
machdep.h m68k: set arch_gettimeoffset directly 2012-12-24 09:36:34 -07:00
machines.h
machw.h mac68k: replace mac68k SCC code with platform device 2010-02-27 18:31:09 +01:00
macintosh.h m68k/mac: Fix scsi_type for Mac LC and similar models 2015-01-11 11:38:46 +01:00
macints.h m68k/mac: oss irq fixes 2011-12-10 19:52:47 +01:00
math-emu.h locking, m68k/asm-offsets: Rename pt_regs offset defines 2009-08-31 18:08:49 +02:00
mc146818rtc.h m68k/atari: Hide RTC_PORT() macro from rtc-cmos 2013-12-08 11:03:22 +01:00
mcf8390.h net: add support for NS8390 based eth controllers on some ColdFire CPU boards 2012-07-12 07:54:45 -07:00
mcf_pgalloc.h tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
mcf_pgtable.h m68k: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:32 -08:00
mcfclk.h m68knommu: add clock creation support macro for other ColdFire CPUs 2012-12-05 10:51:24 +10:00
mcfdma.h m68knommu: move ColdFire DMA register addresses to per-cpu headers 2011-03-15 21:01:54 +10:00
mcfgpio.h m68knommu: Implement gpio support for m54xx. 2014-05-26 13:28:38 +10:00
mcfintc.h m68knommu: map ColdFire interrupts to correct masking bits 2009-09-16 09:43:52 +10:00
mcfmmu.h m68k: ColdFire V4e MMU paging init code and miss handler 2011-12-30 10:20:38 +10:00
mcfpit.h m68knommu: move ColdFire PIT timer base addresses 2011-03-15 21:01:54 +10:00
mcfqspi.h m68k: Remove FSF address 2015-03-15 10:23:30 +01:00
mcfsim.h m68knommu: create and use a common M53xx ColdFire class of CPUs 2013-04-29 09:17:58 +10:00
mcfslt.h m68knommu: move ColdFire slice timer address defiens to 54xx header 2012-09-27 23:34:01 +10:00
mcftimer.h m68k: Fix misspellings in comments. 2016-02-29 09:51:44 +01:00
mcfuart.h m68knommu: Add support for the Coldfire 5251/5253 2012-07-16 09:59:21 +10:00
mcfwdebug.h
mmu.h
mmu_context.h m68k: ColdFire V4e MMU context support code 2011-12-30 10:20:34 +10:00
mmzone.h
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
motorola_pgalloc.h tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
motorola_pgtable.h m68k: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:32 -08:00
movs.h
mvme16xhw.h m68k/UAPI: Move VME Board ID definition to <asm/bootinfo-vme.h> 2013-11-26 11:09:21 +01:00
mvme147hw.h
natfeat.h m68k/atari: Initial ARAnyM support 2011-03-16 19:10:41 +01:00
nettel.h m68knommu: fix wrong register offsets used for ColdFire 5272 multi-function pins 2012-09-27 23:33:54 +10:00
nubus.h
openprom.h
oplib.h
page.h m68k: Provide __phys_to_pfn() and __pfn_to_phys() 2016-01-10 13:56:40 +01:00
page_mm.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
page_no.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
page_offset.h m68k: define PAGE_OFFSET_RAW for ColdFire CPU with MMU enabled 2011-12-30 10:20:31 +10:00
parport.h m68k/q40: Undefine insl/outsl before redefining them 2013-06-24 19:44:19 +02:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
pgalloc.h m68k: create ColdFire MMU pgalloc code 2011-12-30 10:20:40 +10:00
pgtable.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
pgtable_mm.h mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines 2015-02-28 09:57:51 -08:00
pgtable_no.h m68k: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:32 -08:00
processor.h exit_thread: remove empty bodies 2016-05-20 17:58:30 -07:00
ptrace.h new helper: current_user_stack_pointer() 2012-12-19 18:07:39 -05:00
q40_master.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
q40ints.h m68k/irq: Remove obsolete m68k irq framework 2011-11-08 22:35:52 +01:00
quicc_simple.h
raw_io.h m68k/atari: ROM port ISA adapter support 2013-04-16 21:08:11 +02:00
rtc.h
segment.h m68k: macro whitespace fixes 2015-01-13 15:24:03 +02:00
serial.h serial: Fix ASYNC_* => UPF_* flags misuse 2016-01-28 14:17:42 -08:00
setup.h m68k/UAPI: Move generic definitions to <asm/bootinfo.h> 2013-11-26 11:09:16 +01:00
signal.h signals: kill sigfindinword() 2014-06-06 16:08:11 -07:00
smp.h
string.h m68k: Remove inline strcpy() and strcat() implementations 2013-06-24 19:44:18 +02:00
sun3-head.h
sun3_pgalloc.h tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
sun3_pgtable.h m68k: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:32 -08:00
sun3ints.h
sun3mmu.h
sun3x.h
sun3xflop.h m68k: Remove deprecated IRQF_DISABLED 2013-09-26 09:54:16 +02:00
sun3xprom.h
switch_to.h Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
thread_info.h m68k: Remove signal translation and exec_domain 2015-04-12 20:58:25 +02:00
timex.h m68k: Add infrastructure for machine-specific random_get_entropy() 2013-11-26 11:09:24 +01:00
tlb.h
tlbflush.h m68k: add TLB flush support for the ColdFire V4e MMU hardware 2011-12-30 10:20:30 +10:00
traps.h m68k: print memory layout info in boot log 2011-12-24 21:47:57 +10:00
uaccess.h m68k/m68knommu: Implement __get_user_unaligned/__put_user_unaligned() 2013-09-10 11:06:17 +02:00
uaccess_mm.h m68k/uaccess: fix sparse errors 2015-01-13 15:23:28 +02:00
uaccess_no.h put the remnants of ..._user_ret() to rest 2016-01-04 10:28:06 -05:00
ucontext.h m68k: make fp register stores consistent for m68k and ColdFire 2011-12-24 21:47:57 +10:00
unaligned.h m68k: Introduce config option CPU_HAS_NO_UNALIGNED 2012-06-10 10:18:32 +02:00
unistd.h m68k: Wire up preadv2 and pwritev2 2016-04-07 11:44:44 +02:00
user.h
vga.h m68k/video: Create <asm/vga.h> 2012-04-22 20:16:50 +02:00
virtconvert.h m68knommu: Correct page_to_phys when PAGE_OFFSET is non-zero. 2014-06-20 15:11:20 +10:00
zorro.h