From: Boaz Harrosh <bharrosh@panasas.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: axboe@kernel.dk, SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: memory allocation in sg_io()
Date: Thu, 10 Jan 2008 15:05:25 +0200 [thread overview]
Message-ID: <47861815.5090008@panasas.com> (raw)
In-Reply-To: <200801101333.12293.oliver@neukum.org>
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.
Boaz
next prev parent reply other threads:[~2008-01-10 13:05 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 [this message]
2008-01-10 13:06 ` Jens Axboe
2008-01-10 13:14 ` Boaz Harrosh
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=47861815.5090008@panasas.com \
--to=bharrosh@panasas.com \
--cc=axboe@kernel.dk \
--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