All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@fb.com>
Cc: Mike Snitzer <snitzer@redhat.com>,
	linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	dm-devel@redhat.com
Subject: [PATCH 11/15] scsi: remove scsi_cmd_dma_pool
Date: Tue, 10 Jan 2017 16:06:16 +0100	[thread overview]
Message-ID: <1484060780-15592-12-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1484060780-15592-1-git-send-email-hch@lst.de>

There is no need for GFP_DMA allocations of the scsi_cmnd structures
themselves, all that might be DMAed to or from is the actual payload,
or the sense buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/scsi.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 469aa0f..2e24f31 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -102,17 +102,10 @@ struct scsi_host_cmd_pool {
 	struct kmem_cache	*cmd_slab;
 	unsigned int		users;
 	char			*cmd_name;
-	unsigned int		slab_flags;
 };
 
 static struct scsi_host_cmd_pool scsi_cmd_pool = {
 	.cmd_name	= "scsi_cmd_cache",
-	.slab_flags	= SLAB_HWCACHE_ALIGN,
-};
-
-static struct scsi_host_cmd_pool scsi_cmd_dma_pool = {
-	.cmd_name	= "scsi_cmd_cache(DMA)",
-	.slab_flags	= SLAB_HWCACHE_ALIGN|SLAB_CACHE_DMA,
 };
 
 static DEFINE_MUTEX(host_cmd_pool_mutex);
@@ -290,8 +283,6 @@ scsi_find_host_cmd_pool(struct Scsi_Host *shost)
 {
 	if (shost->hostt->cmd_size)
 		return shost->hostt->cmd_pool;
-	if (shost->unchecked_isa_dma)
-		return &scsi_cmd_dma_pool;
 	return &scsi_cmd_pool;
 }
 
@@ -318,10 +309,6 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost)
 		return NULL;
 	}
 
-	pool->slab_flags = SLAB_HWCACHE_ALIGN;
-	if (shost->unchecked_isa_dma)
-		pool->slab_flags |= SLAB_CACHE_DMA;
-
 	if (hostt->cmd_size)
 		hostt->cmd_pool = pool;
 
@@ -349,7 +336,7 @@ scsi_get_host_cmd_pool(struct Scsi_Host *shost)
 
 	if (!pool->users) {
 		pool->cmd_slab = kmem_cache_create(pool->cmd_name, cmd_size, 0,
-						   pool->slab_flags, NULL);
+						   SLAB_HWCACHE_ALIGN, NULL);
 		if (!pool->cmd_slab)
 			goto out_free_pool;
 	}
-- 
2.1.4


  parent reply	other threads:[~2017-01-10 15:06 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 15:06 RFC: split scsi passthrough fields out of struct request Christoph Hellwig
2017-01-10 15:06 ` [PATCH 01/15] virtio_blk: avoid DMA to stack for the sense buffer Christoph Hellwig
2017-01-11  8:26   ` Johannes Thumshirn
2017-01-11  8:26     ` Johannes Thumshirn
2017-01-11  8:43     ` Christoph Hellwig
2017-01-10 15:06 ` [PATCH 02/15] nvme-rdma: fix nvme_rdma_queue_is_ready Christoph Hellwig
2017-01-10 15:06 ` [PATCH 03/15] block: simplify blk_init_allocated_queue Christoph Hellwig
2017-01-10 15:06 ` [PATCH 04/15] block: allow specifying size for extra command data Christoph Hellwig
2017-01-10 15:06 ` [PATCH 05/15] dm: remove incomple BLOCK_PC support Christoph Hellwig
2017-01-12  1:09   ` Mike Snitzer
2017-01-12  8:00     ` Christoph Hellwig
2017-01-12 22:28       ` Mike Snitzer
2017-01-13  8:14         ` Christoph Hellwig
2017-01-13  8:14           ` Christoph Hellwig
2017-01-10 15:06 ` [PATCH 06/15] scsi_dh_rdac: switch to scsi_execute_req_flags() Christoph Hellwig
2017-01-10 15:06 ` [PATCH 07/15] scsi_dh_emc: " Christoph Hellwig
2017-01-10 15:06 ` [PATCH 08/15] scsi_dh_hp_sw: " Christoph Hellwig
2017-01-10 15:06 ` [PATCH 09/15] scsi: remove gfp_flags member in scsi_host_cmd_pool Christoph Hellwig
2017-01-10 15:06 ` [PATCH 10/15] scsi: respect unchecked_isa_dma for blk-mq Christoph Hellwig
2017-01-10 15:06 ` Christoph Hellwig [this message]
2017-01-10 15:06 ` [PATCH 12/15] scsi: remove __scsi_alloc_queue Christoph Hellwig
2017-01-10 15:06 ` [PATCH 13/15] scsi: allocate scsi_cmnd structures as part of struct request Christoph Hellwig
2017-01-10 15:06 ` [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue Christoph Hellwig
2017-01-11  8:42   ` Johannes Thumshirn
2017-01-11  8:42     ` Johannes Thumshirn
2017-01-11  8:45     ` Christoph Hellwig
2017-01-11  8:56       ` Johannes Thumshirn
2017-01-11  8:56         ` Johannes Thumshirn
2017-01-11  8:59         ` Christoph Hellwig
2017-01-11  8:59       ` Hannes Reinecke
2017-01-11  8:59         ` Hannes Reinecke
2017-01-11  9:01         ` Christoph Hellwig
2017-01-11  9:37           ` Hannes Reinecke
2017-01-11  9:37             ` Hannes Reinecke
2017-01-11 22:08             ` Mike Snitzer
2017-01-11 22:01       ` Mike Snitzer
2017-01-12  7:57         ` Christoph Hellwig
2017-01-10 15:06 ` [PATCH 15/15] block: split scsi_request out of struct request Christoph Hellwig
2017-01-12  3:59   ` Jens Axboe
2017-01-12  3:59     ` Jens Axboe
2017-01-11 22:41 ` RFC: split scsi passthrough fields " Mike Snitzer
2017-01-12  7:59   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484060780-15592-12-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.