From: Jens Axboe <axboe@suse.de>
To: gl@dsa-ac.de
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>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH] dc395x: Fix support for highmem
Date: Mon, 21 Mar 2005 11:44:20 +0100 [thread overview]
Message-ID: <20050321104419.GH23911@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.56.0503211111290.20956@pcgl.dsa-ac.de>
On Mon, Mar 21 2005, gl@dsa-ac.de wrote:
> On Mon, 21 Mar 2005, Jens Axboe wrote:
>
> > On Sun, Mar 20 2005, Guennadi Liakhovetski wrote:
> > >
> > > char *kmap_atomic_sg(struct scatterlist *sg, unsigned int offset, int *mapped);
> > > void kunmap_atomic_sg(struct scatterlist *sg, int mapped);
> > >
> > > The latter would just call the kunmap_atomic with the respective KM_ type.
> > > By "merging of sg list entries" above is meant, that pci_map_sg may return
> > > a number smaller than the number of elements in the original sg list
> > > because some adjacent elements were merged during the mapping?
> >
> > Same problem, you want to map N entries at the time which is simply not
> > easily doable. I made a suggestion earlier in the thread, you need to do
> > something ala
> >
> > sg_map_each_entry(sglist, entries, sg, ouput_ptr, flags) {
> > /* transfer sg_virt_len(sg) to/from output_ptr */
> > }
> >
> > that maps each entry successively.
>
> Well, I don't know how and when other drivers use / need this mapping, in
> dc395x and tmscsim you just occasionally need to transfer a couple of
> bytes per PIO, so, it would be a waste to map each sg-entry? If other
So you start at the entry you need, and break after handling the ones
you need to handle. Either pass in a start offset, or just pass in
sglist+offset.
> drivers do always need all, shouldn't we then define 2 APIs - for a single
> mapping and for all. Also, I think, at least am53c974 (tmscsim) does
> sg-processing only semi-automatically, that is you get interrupts and do
> some stuff for each element. So, mapping all sg-entries each time is not
> needed, and you cannot kmap them atomically if you want to keep them
> mapped all the time. In your proposed API, when would you unmap them?
The loop handles the mapping and unmapping for you.
--
Jens Axboe
next prev parent reply other threads:[~2005-03-21 10:44 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 ` [PATCH] dc395x: Fix support for highmem Jens Axboe
2005-03-20 9:14 ` 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 [this message]
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=20050321104419.GH23911@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=g.liakhovetski@gmx.de \
--cc=gl@dsa-ac.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.