Re: [PATCH] scsi: fix sense_slab/bio swapping livelock

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: FUJITA Tomonori <fujita.tomonori@...>
Cc: <James.Bottomley@...>, <torvalds@...>, <akpm@...>, <jens.axboe@...>, <clameter@...>, <penberg@...>, <a.p.zijlstra@...>, <rjw@...>, <linux-kernel@...>
Date: Monday, April 7, 2008 - 2:07 pm

On Mon, 7 Apr 2008, FUJITA Tomonori wrote:

No, it's brought attention to this interesting slab merge issue;
even if in the end we decide that's a non-issue.


I don't believe you _need_ a separate sense_slab even for that:
what I meant was that you just need something like
	pool->cmd_slab = kmem_cache_create(pool->cmd_name,
					   cache_line_align(
					   sizeof(struct scsi_cmnd)) +
					   max_scsi_sense_buffersize,
					   0, pool->slab_flags, NULL);
then point cmd->sense_buffer to (unsigned char *) cmd +
			cache_line_align(sizeof(struct scsi_cmnd));
where cache_line_align and max_scsi_sense_buffersize are preferably
determined at runtime.

Now, it may well be that over the different configurations, at least
some would waste significant memory by putting it all in the one big
buffer, and you're better off with the separate slabs: so I didn't
want to interfere with your direction on that.

Hugh
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Sun Apr 6, 6:56 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Christoph Lameter, (Mon Apr 7, 1:26 am)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 3:40 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Christoph Lameter, (Tue Apr 8, 4:43 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Peter Zijlstra, (Mon Apr 7, 3:55 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 4:31 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 5:00 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 5:05 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 5:30 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 5:36 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Linus Torvalds, (Mon Apr 7, 5:15 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 5:34 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 5:39 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka J Enberg, (Mon Apr 7, 6:05 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Linus Torvalds, (Mon Apr 7, 6:17 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka J Enberg, (Tue Apr 8, 4:42 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Christoph Lameter, (Tue Apr 8, 4:45 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Tue Apr 8, 5:11 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Peter Zijlstra, (Tue Apr 8, 5:40 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Tue Apr 8, 4:44 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Pekka Enberg, (Mon Apr 7, 6:42 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Peter Zijlstra, (Mon Apr 7, 4:47 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, FUJITA Tomonori, (Sun Apr 6, 10:48 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 2:07 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, FUJITA Tomonori, (Tue Apr 8, 10:04 am)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, James Bottomley, (Sun Apr 6, 7:35 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Sun Apr 6, 9:01 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 1:51 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, James Bottomley, (Mon Apr 7, 2:04 pm)
Re: [PATCH] scsi: fix sense_slab/bio swapping livelock, Hugh Dickins, (Mon Apr 7, 2:26 pm)