summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorHongbo Li <lihongbo22@huawei.com>2024-03-25 05:50:48 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-04-01 03:36:11 +0300
commit36f9ef109b1c6935928d09a3e73d744291f71545 (patch)
treedf4595b4fbd0c75233c205768a72d060985221ee /tools/perf/scripts/python/export-to-postgresql.py
parent57339b24a0eda5433751e7e0f4a8ea1e23315f60 (diff)
downloadlinux-36f9ef109b1c6935928d09a3e73d744291f71545.tar.xz
bcachefs: fix trans->mem realloc in __bch2_trans_kmalloc
The old code doesn't consider the mem alloced from mempool when call krealloc on trans->mem. Also in bch2_trans_put, using mempool_free to free trans->mem by condition "trans->mem_bytes == BTREE_TRANS_MEM_MAX" is inaccurate when trans->mem was allocated by krealloc function. Instead, we use used_mempool stuff to record the situation, and realloc or free the trans->mem in elegant way. Also, after krealloc failed in __bch2_trans_kmalloc, the old data should be copied to the new buffer when alloc from mempool_alloc. Fixes: 31403dca5bb1 ("bcachefs: optimize __bch2_trans_get(), kill DEBUG_TRANSACTIONS") Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions