From: Jens Axboe <axboe@suse.de>
To: Mike Christie <mikenc@us.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Matthew Wilcox <matthew@wil.cx>,
James Bottomley <James.Bottomley@SteelEye.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
g.liakhovetski@gmx.de
Subject: Re: [PATCH] dc395x: Fix support for highmem
Date: Wed, 16 Mar 2005 19:53:59 +0100 [thread overview]
Message-ID: <20050316185358.GC7842@suse.de> (raw)
In-Reply-To: <42387EA2.5020106@us.ibm.com>
On Wed, Mar 16 2005, Mike Christie wrote:
> Jens Axboe wrote:
> >On Wed, Mar 16 2005, Christoph Hellwig wrote:
> >
> >>On Wed, Mar 16, 2005 at 05:53:39PM +0100, Jens Axboe wrote:
> >>
> >>>The list doesn't really need dma mapping at that point, the problem here
> >>>is that the driver needs to punt to pio mode because of foo. So calling
> >>>pci/dma_map_* is pointless, since the CPU will have to do the transfer
> >>>anyways. What the driver is really looking for at this point, is a way
> >>>to map the pages in the sglist to a virtual address.
> >>
> >>Given that there's quite a few cases of this "problem" it would be nice
> >>to have common helpers for it. Especially as it's really difficult when
> >>we allow merging of sg list entries
> >
> >
> >I thought about that when writing the above, but is there really more
> >than one case for SCSI drivers? If there is, sure lets add the helpers.
> >But I would consider it a quite rare occurence, I've never seen it
> >before.
> >
>
> I got lost here. If you are talking about the need to kmap a sglist then
> software iscsi has it. iscsi-sfnet used to do
I guess the need to kmap the sglist is not that uncommon, for other
reasons - libata would need it for manually filling data for commands it
emulates, other drives I know do the same. The punt-to-pio part is the
weird part, I hope no one else does that :-)
I guess we should add something ala
sg_map_each_entry(sglist, entries, sg, ouput_ptr, flags) {
/* transfer sg_virt_len(sg) to/from output_ptr */
}
> while (...)
> kmap()
>
> but I fixed that (I think I need to use kmap_atomic though, is that
> correct or is it just a performance improvement - I am calling kmap from
> a thread too so). I just added kmap_atomic to open-iscsi and I believe
> pyx does something similar to the loop above.
The problem with this driver was that it did multiple kmaps, that is no
good. There's no problem doing a single kmap, copy, kunmap from your
thread. kmap_atomic() may be faster, but it requires that you stay
pinned on the same CPU. Usually it is still faster to us it, if you only
keep the mapping for a short time.
--
Jens Axboe
next prev parent reply other threads:[~2005-03-16 18:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200503160209.j2G29cAf010870@hera.kernel.org>
2005-03-16 7:58 ` [PATCH] dc395x: Fix support for highmem Jens Axboe
2005-03-16 15:13 ` James Bottomley
2005-03-16 16:04 ` Jens Axboe
2005-03-16 16:48 ` Matthew Wilcox
2005-03-16 16:53 ` Jens Axboe
2005-03-16 17:02 ` Christoph Hellwig
2005-03-16 17:04 ` Jens Axboe
2005-03-16 18:44 ` Mike Christie
2005-03-16 18:53 ` iSCSI and scatterlists Matthew Wilcox
2005-03-16 19:59 ` Dmitry Yusupov
2005-03-16 18:53 ` Jens Axboe [this message]
2005-03-20 9:14 ` [PATCH] dc395x: Fix support for highmem Christoph Hellwig
2005-03-20 20:51 ` Guennadi Liakhovetski
2005-03-21 7:55 ` Jens Axboe
[not found] ` <7044.1111398919@www16.gmx.net>
2005-03-21 10:38 ` gl
2005-03-21 10:44 ` Jens Axboe
2005-03-21 11:00 ` gl
2005-03-30 21:22 ` Guennadi Liakhovetski
2005-03-30 22:13 ` James Bottomley
2005-03-31 8:58 ` gl
2005-04-09 22:48 ` Guennadi Liakhovetski
2005-04-21 21:49 ` Guennadi Liakhovetski
2005-04-22 11:36 ` Jens Axboe
2005-04-23 9:35 ` Guennadi Liakhovetski
2005-04-23 10:06 ` Guennadi Liakhovetski
2005-04-23 19:01 ` James Bottomley
2005-04-24 0:22 ` Guennadi Liakhovetski
2005-04-24 14:31 ` Guennadi Liakhovetski
2005-04-24 22:11 ` James Bottomley
2005-04-25 19:56 ` Guennadi Liakhovetski
2005-03-16 20:24 ` Guennadi Liakhovetski
2005-03-17 7:40 ` Jens Axboe
[not found] ` <22734.1111050528@www13.gmx.net>
2005-03-17 9:41 ` gl
2005-03-17 10:08 ` Jens Axboe
2005-03-17 10:56 ` gl
2005-03-17 20:51 ` Guennadi Liakhovetski
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=20050316185358.GC7842@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=g.liakhovetski@gmx.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mikenc@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