summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2017-11-01 02:33:02 +0300
committerMike Snitzer <snitzer@redhat.com>2017-11-10 23:44:55 +0300
commit856eb0916d181da6d043cc33e03f54d5c5bbe54a (patch)
tree37dc30db88b6b90a1f1929801acf97209b4548f8 /tools/perf/scripts/python/export-to-postgresql.py
parent114e025968b5990ad0b57bf60697ea64ee206aac (diff)
downloadlinux-856eb0916d181da6d043cc33e03f54d5c5bbe54a.tar.xz
dm: allocate struct mapped_device with kvzalloc
The structure srcu_struct can be very big, its size is proportional to the value CONFIG_NR_CPUS. The Fedora kernel has CONFIG_NR_CPUS 8192, the field io_barrier in the struct mapped_device has 84kB in the debugging kernel and 50kB in the non-debugging kernel. The large size may result in failure of the function kzalloc_node. In order to avoid the allocation failure, we use the function kvzalloc_node, this function falls back to vmalloc if a large contiguous chunk of memory is not available. This patch also moves the field io_barrier to the last position of struct mapped_device - the reason is that on many processor architectures, short memory offsets result in smaller code than long memory offsets - on x86-64 it reduces code size by 320 bytes. Note to stable kernel maintainers - the kernels 4.11 and older don't have the function kvzalloc_node, you can use the function vzalloc_node instead. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions