Commit f4484d13 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge more updates from Andrew Morton:
 "55 patches.

  Subsystems affected by this patch series: percpu, procfs, sysctl,
  misc, core-kernel, get_maintainer, lib, checkpatch, binfmt, nilfs2,
  hfs, fat, adfs, panic, delayacct, kconfig, kcov, and ubsan"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (55 commits)
  lib: remove redundant assignment to variable ret
  ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
  kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR
  lib/Kconfig.debug: make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB
  btrfs: use generic Kconfig option for 256kB page size limit
  arch/Kconfig: split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB
  configs: introduce debug.config for CI-like setup
  delayacct: track delays from memory compact
  Documentation/accounting/delay-accounting.rst: add thrashing page cache and direct compact
  delayacct: cleanup flags in struct task_delay_info and functions use it
  delayacct: fix incomplete disable operation when switch enable to disable
  delayacct: support swapin delay accounting for swapping without blkio
  panic: remove oops_id
  panic: use error_report_end tracepoint on warnings
  fs/adfs: remove unneeded variable make code cleaner
  FAT: use io_schedule_timeout() instead of congestion_wait()
  hfsplus: use struct_group_attr() for memcpy() region
  nilfs2: remove redundant pointer sbufs
  fs/binfmt_elf: use PT_LOAD p_align values for static PIE
  const_structs.checkpatch: add frequently used ops structs
  ...
parents 1d1df41c b1e78ef3
Loading
Loading
Loading
Loading
+27 −28
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ a) waiting for a CPU (while being runnable)
b) completion of synchronous block I/O initiated by the task
c) swapping in pages
d) memory reclaim
e) thrashing page cache
f) direct compact

and makes these statistics available to userspace through
the taskstats interface.
@@ -41,11 +43,12 @@ generic data structure to userspace corresponding to per-pid and per-tgid
statistics. The delay accounting functionality populates specific fields of
this structure. See

     include/linux/taskstats.h
     include/uapi/linux/taskstats.h

for a description of the fields pertaining to delay accounting.
It will generally be in the form of counters returning the cumulative
delay seen for cpu, sync block I/O, swapin, memory reclaim etc.
delay seen for cpu, sync block I/O, swapin, memory reclaim, thrash page
cache, direct compact etc.

Taking the difference of two successive readings of a given
counter (say cpu_delay_total) for a task will give the delay
@@ -88,41 +91,37 @@ seen.

General format of the getdelays command::

	getdelays [-t tgid] [-p pid] [-c cmd...]

	getdelays [-dilv] [-t tgid] [-p pid]

Get delays, since system boot, for pid 10::

	# ./getdelays -p 10
	# ./getdelays -d -p 10
	(output similar to next case)

Get sum of delays, since system boot, for all pids with tgid 5::

	# ./getdelays -t 5


	CPU	count	real total	virtual total	delay total
		7876	92005750	100000000	24001500
	IO	count	delay total
		0	0
	SWAP	count	delay total
		0	0
	RECLAIM	count	delay total
		0	0
	# ./getdelays -d -t 5
	print delayacct stats ON
	TGID	5

Get delays seen in executing a given simple command::

  # ./getdelays -c ls /
	CPU             count     real total  virtual total    delay total  delay average
	                    8        7000000        6872122        3382277          0.423ms
	IO              count    delay total  delay average
		            0              0              0ms
	SWAP            count    delay total  delay average
	                    0              0              0ms
	RECLAIM         count    delay total  delay average
		            0              0              0ms
	THRASHING       count    delay total  delay average
	                    0              0              0ms
	COMPACT         count    delay total  delay average
	                    0              0              0ms

  bin   data1  data3  data5  dev  home  media  opt   root  srv        sys  usr
  boot  data2  data4  data6  etc  lib   mnt    proc  sbin  subdomain  tmp  var
Get IO accounting for pid 1, it works only with -p::

	# ./getdelays -i -p 1
	printing IO accounting
	linuxrc: read=65536, write=0, cancelled_write=0

  CPU	count	real total	virtual total	delay total
	6	4000250		4000000		0
  IO	count	delay total
	0	0
  SWAP	count	delay total
	0	0
  RECLAIM	count	delay total
	0	0
The above command can be used with -v to get more debug information.
+4 −0
Original line number Diff line number Diff line
@@ -997,6 +997,10 @@ config PAGE_SIZE_LESS_THAN_64KB
	depends on !PAGE_SIZE_64KB
	depends on !PARISC_PAGE_SIZE_64KB
	depends on !PPC_64K_PAGES
	depends on PAGE_SIZE_LESS_THAN_256KB

config PAGE_SIZE_LESS_THAN_256KB
	def_bool y
	depends on !PPC_256K_PAGES
	depends on !PAGE_SIZE_256KB

+4 −16
Original line number Diff line number Diff line
@@ -1136,6 +1136,10 @@ config NUMA
	select GENERIC_ARCH_NUMA
	select ACPI_NUMA if ACPI
	select OF_NUMA
	select HAVE_SETUP_PER_CPU_AREA
	select NEED_PER_CPU_EMBED_FIRST_CHUNK
	select NEED_PER_CPU_PAGE_FIRST_CHUNK
	select USE_PERCPU_NUMA_NODE_ID
	help
	  Enable NUMA (Non-Uniform Memory Access) support.

@@ -1152,22 +1156,6 @@ config NODES_SHIFT
	  Specify the maximum number of NUMA Nodes available on the target
	  system.  Increases memory reserved to accommodate various tables.

config USE_PERCPU_NUMA_NODE_ID
	def_bool y
	depends on NUMA

config HAVE_SETUP_PER_CPU_AREA
	def_bool y
	depends on NUMA

config NEED_PER_CPU_EMBED_FIRST_CHUNK
	def_bool y
	depends on NUMA

config NEED_PER_CPU_PAGE_FIRST_CHUNK
	def_bool y
	depends on NUMA

source "kernel/Kconfig.hz"

config ARCH_SPARSEMEM_ENABLE
+2 −7
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ config IA64
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_DYNAMIC_FTRACE if (!ITANIUM)
	select HAVE_FUNCTION_TRACER
	select HAVE_SETUP_PER_CPU_AREA
	select TTY
	select HAVE_ARCH_TRACEHOOK
	select HAVE_VIRT_CPU_ACCOUNTING
@@ -88,9 +89,6 @@ config GENERIC_CALIBRATE_DELAY
	bool
	default y

config HAVE_SETUP_PER_CPU_AREA
	def_bool y

config DMI
	bool
	default y
@@ -292,6 +290,7 @@ config NUMA
	bool "NUMA support"
	depends on !FLATMEM
	select SMP
	select USE_PERCPU_NUMA_NODE_ID
	help
	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
	  Access).  This option is for configuring high-end multiprocessor
@@ -311,10 +310,6 @@ config HAVE_ARCH_NODEDATA_EXTENSION
	def_bool y
	depends on NUMA

config USE_PERCPU_NUMA_NODE_ID
	def_bool y
	depends on NUMA

config HAVE_MEMORYLESS_NODES
	def_bool NUMA

+2 −8
Original line number Diff line number Diff line
@@ -2674,6 +2674,8 @@ config NUMA
	bool "NUMA Support"
	depends on SYS_SUPPORTS_NUMA
	select SMP
	select HAVE_SETUP_PER_CPU_AREA
	select NEED_PER_CPU_EMBED_FIRST_CHUNK
	help
	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
	  Access).  This option improves performance on systems with more
@@ -2684,14 +2686,6 @@ config NUMA
config SYS_SUPPORTS_NUMA
	bool

config HAVE_SETUP_PER_CPU_AREA
	def_bool y
	depends on NUMA

config NEED_PER_CPU_EMBED_FIRST_CHUNK
	def_bool y
	depends on NUMA

config RELOCATABLE
	bool "Relocatable kernel"
	depends on SYS_SUPPORTS_RELOCATABLE
Loading