Skip to content

Commit f4484d1

Browse files
committed
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 <[email protected]>: (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 ...
2 parents 1d1df41 + b1e78ef commit f4484d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+826
-873
lines changed

Documentation/accounting/delay-accounting.rst

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ a) waiting for a CPU (while being runnable)
1313
b) completion of synchronous block I/O initiated by the task
1414
c) swapping in pages
1515
d) memory reclaim
16+
e) thrashing page cache
17+
f) direct compact
1618

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

44-
include/linux/taskstats.h
46+
include/uapi/linux/taskstats.h
4547

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

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

8992
General format of the getdelays command::
9093

91-
getdelays [-t tgid] [-p pid] [-c cmd...]
92-
94+
getdelays [-dilv] [-t tgid] [-p pid]
9395

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

96-
# ./getdelays -p 10
98+
# ./getdelays -d -p 10
9799
(output similar to next case)
98100

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

101-
# ./getdelays -t 5
102-
103-
104-
CPU count real total virtual total delay total
105-
7876 92005750 100000000 24001500
106-
IO count delay total
107-
0 0
108-
SWAP count delay total
109-
0 0
110-
RECLAIM count delay total
111-
0 0
103+
# ./getdelays -d -t 5
104+
print delayacct stats ON
105+
TGID 5
112106

113-
Get delays seen in executing a given simple command::
114107

115-
# ./getdelays -c ls /
108+
CPU count real total virtual total delay total delay average
109+
8 7000000 6872122 3382277 0.423ms
110+
IO count delay total delay average
111+
0 0 0ms
112+
SWAP count delay total delay average
113+
0 0 0ms
114+
RECLAIM count delay total delay average
115+
0 0 0ms
116+
THRASHING count delay total delay average
117+
0 0 0ms
118+
COMPACT count delay total delay average
119+
0 0 0ms
116120

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

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

121-
CPU count real total virtual total delay total
122-
6 4000250 4000000 0
123-
IO count delay total
124-
0 0
125-
SWAP count delay total
126-
0 0
127-
RECLAIM count delay total
128-
0 0
127+
The above command can be used with -v to get more debug information.

arch/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,10 @@ config PAGE_SIZE_LESS_THAN_64KB
997997
depends on !PAGE_SIZE_64KB
998998
depends on !PARISC_PAGE_SIZE_64KB
999999
depends on !PPC_64K_PAGES
1000+
depends on PAGE_SIZE_LESS_THAN_256KB
1001+
1002+
config PAGE_SIZE_LESS_THAN_256KB
1003+
def_bool y
10001004
depends on !PPC_256K_PAGES
10011005
depends on !PAGE_SIZE_256KB
10021006

arch/arm64/Kconfig

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,10 @@ config NUMA
11361136
select GENERIC_ARCH_NUMA
11371137
select ACPI_NUMA if ACPI
11381138
select OF_NUMA
1139+
select HAVE_SETUP_PER_CPU_AREA
1140+
select NEED_PER_CPU_EMBED_FIRST_CHUNK
1141+
select NEED_PER_CPU_PAGE_FIRST_CHUNK
1142+
select USE_PERCPU_NUMA_NODE_ID
11391143
help
11401144
Enable NUMA (Non-Uniform Memory Access) support.
11411145

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

1155-
config USE_PERCPU_NUMA_NODE_ID
1156-
def_bool y
1157-
depends on NUMA
1158-
1159-
config HAVE_SETUP_PER_CPU_AREA
1160-
def_bool y
1161-
depends on NUMA
1162-
1163-
config NEED_PER_CPU_EMBED_FIRST_CHUNK
1164-
def_bool y
1165-
depends on NUMA
1166-
1167-
config NEED_PER_CPU_PAGE_FIRST_CHUNK
1168-
def_bool y
1169-
depends on NUMA
1170-
11711159
source "kernel/Kconfig.hz"
11721160

11731161
config ARCH_SPARSEMEM_ENABLE

arch/ia64/Kconfig

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ config IA64
3232
select HAVE_FTRACE_MCOUNT_RECORD
3333
select HAVE_DYNAMIC_FTRACE if (!ITANIUM)
3434
select HAVE_FUNCTION_TRACER
35+
select HAVE_SETUP_PER_CPU_AREA
3536
select TTY
3637
select HAVE_ARCH_TRACEHOOK
3738
select HAVE_VIRT_CPU_ACCOUNTING
@@ -88,9 +89,6 @@ config GENERIC_CALIBRATE_DELAY
8889
bool
8990
default y
9091

91-
config HAVE_SETUP_PER_CPU_AREA
92-
def_bool y
93-
9492
config DMI
9593
bool
9694
default y
@@ -292,6 +290,7 @@ config NUMA
292290
bool "NUMA support"
293291
depends on !FLATMEM
294292
select SMP
293+
select USE_PERCPU_NUMA_NODE_ID
295294
help
296295
Say Y to compile the kernel to support NUMA (Non-Uniform Memory
297296
Access). This option is for configuring high-end multiprocessor
@@ -311,10 +310,6 @@ config HAVE_ARCH_NODEDATA_EXTENSION
311310
def_bool y
312311
depends on NUMA
313312

314-
config USE_PERCPU_NUMA_NODE_ID
315-
def_bool y
316-
depends on NUMA
317-
318313
config HAVE_MEMORYLESS_NODES
319314
def_bool NUMA
320315

arch/mips/Kconfig

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,6 +2674,8 @@ config NUMA
26742674
bool "NUMA Support"
26752675
depends on SYS_SUPPORTS_NUMA
26762676
select SMP
2677+
select HAVE_SETUP_PER_CPU_AREA
2678+
select NEED_PER_CPU_EMBED_FIRST_CHUNK
26772679
help
26782680
Say Y to compile the kernel to support NUMA (Non-Uniform Memory
26792681
Access). This option improves performance on systems with more
@@ -2684,14 +2686,6 @@ config NUMA
26842686
config SYS_SUPPORTS_NUMA
26852687
bool
26862688

2687-
config HAVE_SETUP_PER_CPU_AREA
2688-
def_bool y
2689-
depends on NUMA
2690-
2691-
config NEED_PER_CPU_EMBED_FIRST_CHUNK
2692-
def_bool y
2693-
depends on NUMA
2694-
26952689
config RELOCATABLE
26962690
bool "Relocatable kernel"
26972691
depends on SYS_SUPPORTS_RELOCATABLE

arch/mips/mm/init.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -519,17 +519,9 @@ static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
519519
return node_distance(cpu_to_node(from), cpu_to_node(to));
520520
}
521521

522-
static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
523-
size_t align)
522+
static int __init pcpu_cpu_to_node(int cpu)
524523
{
525-
return memblock_alloc_try_nid(size, align, __pa(MAX_DMA_ADDRESS),
526-
MEMBLOCK_ALLOC_ACCESSIBLE,
527-
cpu_to_node(cpu));
528-
}
529-
530-
static void __init pcpu_fc_free(void *ptr, size_t size)
531-
{
532-
memblock_free(ptr, size);
524+
return cpu_to_node(cpu);
533525
}
534526

535527
void __init setup_per_cpu_areas(void)
@@ -545,7 +537,7 @@ void __init setup_per_cpu_areas(void)
545537
rc = pcpu_embed_first_chunk(PERCPU_MODULE_RESERVE,
546538
PERCPU_DYNAMIC_RESERVE, PAGE_SIZE,
547539
pcpu_cpu_distance,
548-
pcpu_fc_alloc, pcpu_fc_free);
540+
pcpu_cpu_to_node);
549541
if (rc < 0)
550542
panic("Failed to initialize percpu areas.");
551543

arch/powerpc/Kconfig

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ config ARCH_MMAP_RND_COMPAT_BITS_MIN
5555
default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
5656
default 11 # 11 = 23 (8MB) - 12 (4K)
5757

58-
config HAVE_SETUP_PER_CPU_AREA
59-
def_bool PPC64
60-
61-
config NEED_PER_CPU_EMBED_FIRST_CHUNK
62-
def_bool y if PPC64
63-
64-
config NEED_PER_CPU_PAGE_FIRST_CHUNK
65-
def_bool y if PPC64
66-
6758
config NR_IRQS
6859
int "Number of virtual interrupt numbers"
6960
range 32 1048576
@@ -241,6 +232,7 @@ config PPC
241232
select HAVE_REGS_AND_STACK_ACCESS_API
242233
select HAVE_RELIABLE_STACKTRACE
243234
select HAVE_RSEQ
235+
select HAVE_SETUP_PER_CPU_AREA if PPC64
244236
select HAVE_SOFTIRQ_ON_OWN_STACK
245237
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
246238
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
@@ -255,6 +247,8 @@ config PPC
255247
select MMU_GATHER_RCU_TABLE_FREE
256248
select MODULES_USE_ELF_RELA
257249
select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
250+
select NEED_PER_CPU_EMBED_FIRST_CHUNK if PPC64
251+
select NEED_PER_CPU_PAGE_FIRST_CHUNK if PPC64
258252
select NEED_SG_DMA_LENGTH
259253
select OF
260254
select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE
@@ -660,6 +654,7 @@ config NUMA
660654
bool "NUMA Memory Allocation and Scheduler Support"
661655
depends on PPC64 && SMP
662656
default y if PPC_PSERIES || PPC_POWERNV
657+
select USE_PERCPU_NUMA_NODE_ID
663658
help
664659
Enable NUMA (Non-Uniform Memory Access) support.
665660

@@ -673,10 +668,6 @@ config NODES_SHIFT
673668
default "4"
674669
depends on NUMA
675670

676-
config USE_PERCPU_NUMA_NODE_ID
677-
def_bool y
678-
depends on NUMA
679-
680671
config HAVE_MEMORYLESS_NODES
681672
def_bool y
682673
depends on NUMA

0 commit comments

Comments
 (0)