From 6e70d05d2a856e2d24ca0b9d80ff751847dfcbc5 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Wed, 7 Jul 2010 09:21:10 -0400 Subject: [RHEL6 PATCH 0/6] allocate discard request's page in SCSI layer BZ 610054 Brew build: https://brewweb.devel.redhat.com/taskinfo?taskID=2576601 Tested against discard capable devices: TRIM, UNMAP, and WRITE_SAME_16. Description: This is a blocker for our long-term ability to add more sophisticated discard support to the RHEL6 kernel (over the RHEL6 lifecycle, e.g. > 6.0). RHEL6's kernel (and all released upstream Linux kernels) currently have a problem systemic with the way memory is allocated for SCSI's exclusive use when handling discard requests. Currently, the block layer allocates the discard page and passes it all the way down to the SCSI layer. This imposes that _all_ block drivers (e.g. DM, MD, etc) must allocate their own page for each and every discard request they issue. This is a serious problem that has recently seen significant upstream attention. Christoph Hellwig (1): block: don't allocate a payload for discard request FUJITA Tomonori (3): scsi: add sd_unprep_fn to free discard page scsi: remove unused free discard page in sd_done scsi: convert discard to REQ_TYPE_FS instead of REQ_TYPE_BLOCK_PC James Bottomley (1): block: implement an unprep function corresponding directly to prep Mike Snitzer (1): scsi: fix leak in scsi_setup_discard_cmnd error path block/blk-barrier.c | 33 ++++------------------- block/blk-core.c | 57 ++++++++++++++++++++++++++++++++++++++++ block/blk-settings.c | 17 ++++++++++++ drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/sd.c | 67 +++++++++++++++++++++++++++++++++------------- include/linux/blkdev.h | 6 ++++ 6 files changed, 135 insertions(+), 47 deletions(-)