From: Boaz Harrosh <bharrosh@panasas.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Oliver Neukum <oliver@neukum.org>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: memory allocation in sg_io()
Date: Thu, 10 Jan 2008 15:14:46 +0200 [thread overview]
Message-ID: <47861A46.2030006@panasas.com> (raw)
In-Reply-To: <20080110130628.GA6258@kernel.dk>
On Thu, Jan 10 2008 at 15:06 +0200, Jens Axboe <jens.axboe@oracle.com> wrote:
> On Thu, Jan 10 2008, Boaz Harrosh wrote:
>> On Thu, Jan 10 2008 at 14:33 +0200, Oliver Neukum <oliver@neukum.org> wrote:
>>> Hi,
>>>
>>> could you explain to me why this code can get away with allocating the
>>> sense buffer on the stack?
>>>
>>> static int sg_io(struct file *file, struct request_queue *q,
>>> struct gendisk *bd_disk, struct sg_io_hdr *hdr)
>>> {
>>> unsigned long start_time;
>>> int writing = 0, ret = 0, has_write_perm = 0;
>>> struct request *rq;
>>> char sense[SCSI_SENSE_BUFFERSIZE];
>>>
>>> Regards
>>> Oliver
>>> -
>> where? what? do you mean in scsi_ioctl.c?
>> why not it's a synchronous call?
>> Do you mean 96 bytes is too big?
>> Do you mean DMA alignment and cache coherency? I'm working
>> on that for scsi devices.
>
> I'm guessing aligment - so the answer is that 'it cannot get away with
> it'.
>
I'm working on something for scsi.
Other block devices I don't know.
Boaz
next prev parent reply other threads:[~2008-01-10 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 12:33 memory allocation in sg_io() Oliver Neukum
2008-01-10 13:05 ` Boaz Harrosh
2008-01-10 13:06 ` Jens Axboe
2008-01-10 13:14 ` Boaz Harrosh [this message]
2008-01-10 13:19 ` Oliver Neukum
2008-01-10 13:24 ` Jens Axboe
2008-01-10 13:30 ` Matthew Wilcox
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=47861A46.2030006@panasas.com \
--to=bharrosh@panasas.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=oliver@neukum.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox