diff options
author | Dongli Zhang <[email protected]> | 2021-01-23 00:08:53 -0800 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2021-02-23 07:52:56 -0500 |
commit | 489084dd3f7e4bd649814bd62839aef4456659e8 (patch) | |
tree | ccf6a63bba7d3cb91036e8560110f2e47ff07fd2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a3c06ae158dd6fa8336157c31d9234689d068d02 (diff) |
vhost scsi: alloc vhost_scsi with kvzalloc() to avoid delay
The size of 'struct vhost_scsi' is order-10 (~2.3MB). It may take long time
delay by kzalloc() to compact memory pages by retrying multiple times when
there is a lack of high-order pages. As a result, there is latency to
create a VM (with vhost-scsi) or to hotadd vhost-scsi-based storage.
The prior commit 595cb754983d ("vhost/scsi: use vmalloc for order-10
allocation") prefers to fallback only when really needed, while this patch
allocates with kvzalloc() with __GFP_NORETRY implicitly set to avoid
retrying memory pages compact for multiple times.
The __GFP_NORETRY is implicitly set if the size to allocate is more than
PAGE_SZIE and when __GFP_RETRY_MAYFAIL is not explicitly set.
Cc: Aruna Ramakrishna <[email protected]>
Cc: Joe Jin <[email protected]>
Signed-off-by: Dongli Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions