lkml.org 
[lkml]   [2008]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: Tree for July 16 (crash on quad core AMD)
On Sat, 19 Jul 2008 09:59:11 +0900
Tejun Heo <htejun@gmail.com> wrote:

> Pierre Ossman wrote:
> > I just have one objection to your version, and that is that it cannot
> > be used to nibble away at the sg list. The _next() call jumps an entire
> > page, whereas you sometimes need to consume that page in two different
> > sweeps. This could be handled by some external buffer that keeps the
> > remainder of the page, but the point of these functions was to keep
> > things simple for the callers.
>
> Well, I don't know how often such usages would be necessary. If it's a
> very common ops, you can add a param to the next function but frankly I
> think it's better to build a inside control structure for that. There's
> no need for external buffer, just an inner loop is sufficient.
>

I'm not sure how this can be solved by an inner loop. My primary use
case is:

1. Wait for interrupt
2. Write n bytes
3. goto 1

n has no guarantee of being aligned to any page boundaries, so state
needs to be kept between each invokation of writing a chunk of data. I
doubt I'm alone in this use pattern (in fact, most device drivers using
PIO should do something similar).

--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-07-19 03:33    [W:0.080 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site