aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2009-12-14 17:58:41 -0800
committerLinus Torvalds <[email protected]>2009-12-15 08:53:15 -0800
commitefa90a981bbc891efad96db2a75b5487e00852ca (patch)
treefc64a5d5b71e84eb1eec2810fb0568a79a361827 /tools/perf/scripts/python
parentf29ad6a99b596b8169744d107bf088e8be9e8d0d (diff)
swap_info: change to array of pointers
The swap_info_struct is only 76 or 104 bytes, but it does seem wrong to reserve an array of about 30 of them in bss, when most people will want only one. Change swap_info[] to an array of pointers. That does need a "type" field in the structure: pack it as a char with next type and short prio (aha, char is unsigned by default on PowerPC). Use the (admittedly peculiar) name "type" throughout for this index. /proc/swaps does not take swap_lock: I wouldn't want it to, but do take care with barriers when adding a new item to the array (never removed). Signed-off-by: Hugh Dickins <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions