Skip to content

Commit eeff68c

Browse files
Christoph Hellwigaxboe
authored andcommitted
scsi: remove scsi_cmd_dma_pool
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> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 0a6ac4e commit eeff68c

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

drivers/scsi/scsi.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,10 @@ struct scsi_host_cmd_pool {
102102
struct kmem_cache *cmd_slab;
103103
unsigned int users;
104104
char *cmd_name;
105-
unsigned int slab_flags;
106105
};
107106

108107
static struct scsi_host_cmd_pool scsi_cmd_pool = {
109108
.cmd_name = "scsi_cmd_cache",
110-
.slab_flags = SLAB_HWCACHE_ALIGN,
111-
};
112-
113-
static struct scsi_host_cmd_pool scsi_cmd_dma_pool = {
114-
.cmd_name = "scsi_cmd_cache(DMA)",
115-
.slab_flags = SLAB_HWCACHE_ALIGN|SLAB_CACHE_DMA,
116109
};
117110

118111
static DEFINE_MUTEX(host_cmd_pool_mutex);
@@ -290,8 +283,6 @@ scsi_find_host_cmd_pool(struct Scsi_Host *shost)
290283
{
291284
if (shost->hostt->cmd_size)
292285
return shost->hostt->cmd_pool;
293-
if (shost->unchecked_isa_dma)
294-
return &scsi_cmd_dma_pool;
295286
return &scsi_cmd_pool;
296287
}
297288

@@ -318,10 +309,6 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost)
318309
return NULL;
319310
}
320311

321-
pool->slab_flags = SLAB_HWCACHE_ALIGN;
322-
if (shost->unchecked_isa_dma)
323-
pool->slab_flags |= SLAB_CACHE_DMA;
324-
325312
if (hostt->cmd_size)
326313
hostt->cmd_pool = pool;
327314

@@ -349,7 +336,7 @@ scsi_get_host_cmd_pool(struct Scsi_Host *shost)
349336

350337
if (!pool->users) {
351338
pool->cmd_slab = kmem_cache_create(pool->cmd_name, cmd_size, 0,
352-
pool->slab_flags, NULL);
339+
SLAB_HWCACHE_ALIGN, NULL);
353340
if (!pool->cmd_slab)
354341
goto out_free_pool;
355342
}

0 commit comments

Comments
 (0)