]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
target: Don't zero pages used for data buffers
authorroland@purestorage.com <roland@purestorage.com>
Wed, 4 Jan 2012 23:59:58 +0000 (15:59 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 18 Jan 2012 08:29:57 +0000 (08:29 +0000)
commit9db9da332250dbe662995703a4dcdd692112f0c3
treebec92f208f928e41e84cc03ff9687e35eda6a062
parent6816966a8418b980481b4dced7eddd1796b145e8
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: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c