Skip to content
Commit 9db9da33 authored by roland@purestorage.com's avatar roland@purestorage.com Committed by Nicholas Bellinger
Browse files

target: Don't zero pages used for data buffers



Doing alloc_page(GFP_KERNEL | __GFP_ZERO) to get pages used for data
buffers wastes a lot of CPU clearing pages that will be quickly be
overwritten by the actual data.  However, for emulated control
commands such as INQUIRY and so on, the code does assume that the
buffer is zeroed.

To avoid this CPU overhead, skip the __GFP_ZERO for commands that are
actually moving data, ie cmds that have SCF_SCSI_DATA_SG_IO_CDB set.

Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 6816966a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment