linux_old1/include/trace/events
Michal Hocko dcda9b0471 mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic
__GFP_REPEAT was designed to allow retry-but-eventually-fail semantic to
the page allocator.  This has been true but only for allocations
requests larger than PAGE_ALLOC_COSTLY_ORDER.  It has been always
ignored for smaller sizes.  This is a bit unfortunate because there is
no way to express the same semantic for those requests and they are
considered too important to fail so they might end up looping in the
page allocator for ever, similarly to GFP_NOFAIL requests.

Now that the whole tree has been cleaned up and accidental or misled
usage of __GFP_REPEAT flag has been removed for !costly requests we can
give the original flag a better name and more importantly a more useful
semantic.  Let's rename it to __GFP_RETRY_MAYFAIL which tells the user
that the allocator would try really hard but there is no promise of a
success.  This will work independent of the order and overrides the
default allocator behavior.  Page allocator users have several levels of
guarantee vs.  cost options (take GFP_KERNEL as an example)

 - GFP_KERNEL & ~__GFP_RECLAIM - optimistic allocation without _any_
   attempt to free memory at all. The most light weight mode which even
   doesn't kick the background reclaim. Should be used carefully because
   it might deplete the memory and the next user might hit the more
   aggressive reclaim

 - GFP_KERNEL & ~__GFP_DIRECT_RECLAIM (or GFP_NOWAIT)- optimistic
   allocation without any attempt to free memory from the current
   context but can wake kswapd to reclaim memory if the zone is below
   the low watermark. Can be used from either atomic contexts or when
   the request is a performance optimization and there is another
   fallback for a slow path.

 - (GFP_KERNEL|__GFP_HIGH) & ~__GFP_DIRECT_RECLAIM (aka GFP_ATOMIC) -
   non sleeping allocation with an expensive fallback so it can access
   some portion of memory reserves. Usually used from interrupt/bh
   context with an expensive slow path fallback.

 - GFP_KERNEL - both background and direct reclaim are allowed and the
   _default_ page allocator behavior is used. That means that !costly
   allocation requests are basically nofail but there is no guarantee of
   that behavior so failures have to be checked properly by callers
   (e.g. OOM killer victim is allowed to fail currently).

 - GFP_KERNEL | __GFP_NORETRY - overrides the default allocator behavior
   and all allocation requests fail early rather than cause disruptive
   reclaim (one round of reclaim in this implementation). The OOM killer
   is not invoked.

 - GFP_KERNEL | __GFP_RETRY_MAYFAIL - overrides the default allocator
   behavior and all allocation requests try really hard. The request
   will fail if the reclaim cannot make any progress. The OOM killer
   won't be triggered.

 - GFP_KERNEL | __GFP_NOFAIL - overrides the default allocator behavior
   and all allocation requests will loop endlessly until they succeed.
   This might be really dangerous especially for larger orders.

Existing users of __GFP_REPEAT are changed to __GFP_RETRY_MAYFAIL
because they already had their semantic.  No new users are added.
__alloc_pages_slowpath is changed to bail out for __GFP_RETRY_MAYFAIL if
there is no progress and we have already passed the OOM point.

This means that all the reclaim opportunities have been exhausted except
the most disruptive one (the OOM killer) and a user defined fallback
behavior is more sensible than keep retrying in the page allocator.

[akpm@linux-foundation.org: fix arch/sparc/kernel/mdesc.c]
[mhocko@suse.com: semantic fix]
  Link: http://lkml.kernel.org/r/20170626123847.GM11534@dhcp22.suse.cz
[mhocko@kernel.org: address other thing spotted by Vlastimil]
  Link: http://lkml.kernel.org/r/20170626124233.GN11534@dhcp22.suse.cz
Link: http://lkml.kernel.org/r/20170623085345.11304-3-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Alex Belits <alex.belits@cavium.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: NeilBrown <neilb@suse.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-12 16:26:03 -07:00
..
9p.h
afs.h afs: Refcount the afs_call struct 2017-01-09 11:10:02 +00:00
alarmtimer.h ktime: Get rid of the union 2016-12-25 17:21:22 +01:00
asoc.h ASoC: trace: fix printing jack name 2016-02-26 10:52:48 +09:00
bcache.h block: better op and flags encoding 2016-10-28 08:48:16 -06:00
block.h block: remove the errors field from struct request 2017-04-20 12:16:10 -06:00
bpf.h bpf: map_get_next_key to return first key on NULL 2017-04-25 11:57:45 -04:00
btrfs.h btrfs: cleanup unused qgroup trace event 2017-06-19 18:25:57 +02:00
cgroup.h kernfs: handle null pointers while printing node name and path 2017-02-10 16:02:26 +01:00
clk.h
cma.h
compaction.h mm, trace: extract COMPACTION_STATUS and ZONE_TYPE to a common header 2017-02-22 16:41:27 -08:00
context_tracking.h
cpuhp.h cpu/hotplug: Add multi instance support 2016-09-02 20:05:05 +02:00
devlink.h devlink: fix trace format string 2016-07-14 22:16:05 -07:00
dma_fence.h dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
ext4.h ext4: support GETFSMAP ioctls 2017-04-30 00:36:53 -04:00
f2fs.h f2fs: split bio cache 2017-05-23 21:05:39 -07:00
fib.h net: Make table id type u32 2015-09-01 14:32:44 -07:00
fib6.h ipv6, trace: fix tos reporting on fib6_table_lookup 2016-03-20 13:44:34 -04:00
filelock.h locks: sprinkle some tracepoints around the file locking code 2016-01-08 11:38:13 -05:00
filemap.h fs: new infrastructure for writeback error handling and reporting 2017-07-06 07:02:25 -04:00
fs_dax.h dax: add tracepoint to dax_insert_mapping() 2017-05-08 17:15:16 -07:00
fsi.h drivers/fsi: Add tracepoints for low-level operations 2017-06-09 11:52:08 +02:00
fsi_master_gpio.h drivers/fsi/gpio: Add tracepoints for GPIO master 2017-06-09 11:52:09 +02:00
gpio.h tracing: gpio: Add Kconfig option for enabling/disabling trace events 2015-10-20 21:56:10 -04:00
host1x.h
hswadsp.h
huge_memory.h mm, thp: convert from optimistic swapin collapsing to conservative 2016-07-26 16:19:19 -07:00
i2c.h i2c: break out smbus support into separate file 2017-05-31 21:01:03 +02:00
intel-sst.h
intel_ish.h HID: intel-ish-hid: ipc layer 2016-08-17 11:13:07 +02:00
iommu.h iommu: Remove pci.h include from trace/events/iommu.h 2017-04-29 00:20:49 +02:00
ipi.h
irq.h irq: Fix typo in tracepoint.xml 2016-09-29 10:03:38 +02:00
jbd2.h
kmem.h Nothing major this round. Mostly small clean ups and fixes. 2016-03-24 10:52:25 -07:00
kvm.h KVM: x86: add KVM_CAP_X2APIC_API 2016-07-14 09:03:57 +02:00
libata.h ata: Handle ATA NCQ NO-DATA commands correctly 2016-07-15 08:08:13 -04:00
lock.h
mce.h x86/mce/AMD: Save MCA_IPID in MCE struct on SMCA systems 2016-09-13 15:23:12 +02:00
mdio.h net/phy: add trace events for mdio accesses 2016-11-24 11:55:43 -05:00
migrate.h
mmc.h mmc: core: Provide tracepoints for request processing 2016-05-02 10:33:11 +02:00
mmflags.h mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic 2017-07-12 16:26:03 -07:00
module.h
napi.h net: fixup for tracepoint napi:napi_poll 2016-07-15 15:55:01 -07:00
net.h
nilfs2.h nilfs2: add tracepoints for analyzing reading and writing metadata files 2015-11-06 17:50:42 -08:00
nmi.h
oom.h mm/oom_kill.c: add tracepoints for oom reaper-related events 2017-07-10 16:32:32 -07:00
page_isolation.h mm/page_isolation: fix tracepoint to mirror check function behavior 2016-04-01 17:03:37 -05:00
page_ref.h mm/page_ref: add tracepoint to track down page reference manipulation 2016-03-17 15:09:34 -07:00
pagemap.h
percpu.h percpu: add tracepoint support for percpu memory 2017-06-20 15:31:43 -04:00
power.h cpufreq: intel_pstate: Add io_boost trace 2016-09-16 23:55:30 +02:00
power_cpu_migrate.h
printk.h printk, tracing: Avoiding unneeded blank lines 2016-07-15 15:52:41 -04:00
random.h
rcu.h rcu: Prevent rcu_barrier() from starting needless grace periods 2017-06-08 08:25:22 -07:00
regulator.h
rpm.h
rxrpc.h rxrpc: Add service upgrade support for client connections 2017-06-05 14:30:49 +01:00
sched.h sched,tracing: Update trace_sched_pi_setprio() 2017-04-04 11:44:06 +02:00
scsi.h scsi-trace: define ZBC_IN and ZBC_OUT 2016-04-11 16:57:09 -04:00
signal.h
skb.h
smbus.h i2c: break out smbus support into separate file 2017-05-31 21:01:03 +02:00
sock.h
spi.h spi: Generalize SPI "master" to "controller" 2017-06-13 18:51:11 +01:00
spmi.h spmi: add command tracepoints for SPMI 2015-08-05 12:27:09 -07:00
sunrpc.h SUNRPC: Add tracepoints for dropped and deferred requests 2016-07-13 15:53:43 -04:00
sunvnet.h sunvnet: Add support for perf LDC event tracing 2016-02-07 14:13:05 -05:00
swiotlb.h swiotlb: Add swiotlb=noforce debug option 2016-12-19 09:05:20 -05:00
syscalls.h tracing: Add #undef to fix compile error 2017-03-03 09:45:01 -05:00
target.h target: Minimize SCSI header #include directives 2015-06-02 08:03:25 -07:00
task.h tracing: Don't make assumptions about length of string on task rename 2015-08-31 10:47:14 -04:00
thermal.h trace: thermal: add another parameter 'power' to the tracing function 2017-05-05 15:54:45 +08:00
thermal_power_allocator.h thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thp.h
timer.h This release has no new tracing features, just clean ups, minor fixes 2017-02-27 13:26:17 -08:00
tlb.h tracing: Remove duplicate checks for online CPUs 2016-03-08 11:19:28 -05:00
udp.h
ufs.h scsi: ufs: add trace event for ufs commands 2017-01-05 18:10:04 -05:00
v4l2.h [media] v4l: Add metadata buffer type and format 2017-04-14 22:37:02 -03:00
vb2.h [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
vmscan.h mm, vmscan: add mm_vmscan_inactive_list_is_low tracepoint 2017-02-22 16:41:29 -08:00
vsock_virtio_transport_common.h VSOCK: Introduce virtio_vsock_common.ko 2016-08-02 02:57:29 +03:00
wbt.h blk-wbt: add general throttling mechanism 2016-11-10 13:53:32 -07:00
workqueue.h
writeback.h mm: vmscan: kick flushers when we encounter dirty pages on the LRU 2017-02-24 17:46:54 -08:00
xdp.h bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
xen.h tracing: Add TRACE_DEFINE_SIZEOF() macros 2017-06-13 17:11:08 -04:00