From: Jens Axboe <axboe@suse.de>
To: Douglas Gilbert <dougg@torque.net>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>,
James Bottomley <James.Bottomley@SteelEye.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
hch@infradead.org
Subject: Re: [PATCH] scsi_debug [was: scsi_debug issues]
Date: Fri, 22 Oct 2004 12:04:08 +0200 [thread overview]
Message-ID: <20041022100408.GY1820@suse.de> (raw)
In-Reply-To: <4174BAE8.50103@torque.net>
On Tue, Oct 19 2004, Douglas Gilbert wrote:
> Nishanth Aravamudan wrote:
> >On Tue, Oct 19, 2004 at 08:05:53AM +1000, Douglas Gilbert wrote:
> >
> >>Nishanth Aravamudan wrote:
> >>
> >>>On Mon, Oct 18, 2004 at 11:44:59PM +1000, Douglas Gilbert wrote:
> >>>
> >>>
> >>>>James Bottomley wrote:
> >>>>
> >>>>
> >>>>>On Sat, 2004-10-16 at 01:51, Douglas Gilbert wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>So this problem seems related to highmem.
> >>>
> >>>
> >>><snip>
> >>>
> >>>>The above required a fair few changes to scsi_debug.
> >>>>Attached is a patch that rolls "kmap" changes with
> >>>>patches I have sent recently for scsi_debug.
> >>>>Attachment is gzipped (due to size) and applies against
> >>>>lk 2.6.8.1 -> lk 2.6.9-rc4 .
> >>>>
> >>>>Nishanth, could you test this with highmem?
> >>>
> >>>
> >>>Doug,
> >>>
> >>>I ran 2.6.9-rc4 with your patch applied and had several dump_stack()s
> >>>occur (complaining about sleeping in an invalid context) and a final
> >>>panic during mkfs :) I think something is still wrong... ;) Output is
> >>>below and attached.
> >>
> >>Ok, it looks like kmap_atomic() is needed.
> >>Could you try this additional patch.
> >
> >
> >Great! That patch seems to have fixed it. I am able to vi files, sync
> >the scsi_debug 'disks' and not have any hangs. It is noticeably slower,
> >though, it seems. Might that just be a side effect of the atomic calls?
>
> One would expect it to be pretty fast since only a
> ram copy is involved.
>
> Perhaps James can comment on this strategy:
>
> if (( kaddr = page_address(scatp->page)) {
> kaddr += scatp->offset;
> memcpy(....);
> } else {
> kaddr = kmap_atomic(scatp->page) + scatp-offset;
> memcpy(....);
> kunmap_atomic(scatp->page);
> }
Don't do that, always kmap_atomic(). It already does various checks to
avoid unecessary work.
--
Jens Axboe
next prev parent reply other threads:[~2004-10-22 10:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 19:01 scsi_debug issues Nishanth Aravamudan
2004-10-16 6:51 ` Douglas Gilbert
2004-10-16 10:50 ` Christoph Hellwig
2004-10-16 13:12 ` James Bottomley
2004-10-18 13:44 ` [PATCH] scsi_debug [was: scsi_debug issues] Douglas Gilbert
2004-10-18 18:37 ` Nishanth Aravamudan
2004-10-18 22:05 ` Douglas Gilbert
2004-10-18 23:23 ` Nishanth Aravamudan
2004-10-19 6:57 ` Douglas Gilbert
2004-10-21 21:36 ` Nishanth Aravamudan
2004-10-22 10:04 ` Jens Axboe [this message]
2004-10-22 10:02 ` Jens Axboe
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=20041022100408.GY1820@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=dougg@torque.net \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nacc@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).