Re: [PATCH] sendfile removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 01 2007, H. Peter Anvin wrote:
> > So there's a few things to take away from this:
> > 
> >  - regular file access MUST NOT return EAGAIN just because a page isn't 
> >    in the cache. Doing so is simply a bug. No ifs, buts or maybe's about 
> >    it!
> > 
> >    Busy-looping is NOT ACCEPTABLE!
> > 
> >  - you *could* make some alternative conventions:
> > 
> > 	(a) you could make O_NONBLOCK mean that you'll at least 
> > 	    guarantee that you *start* the IO, and while you never return 
> > 	    EAGAIN, you migth validly return a _partial_ result!
> > 
> > 	(b) variation on (a): it's ok to return EAGAIN if _you_ were the 
> > 	    one who started the IO during this particular time aroudn the 
> > 	    loop. But if you find a page that isn't up-to-date yet, and 
> > 	    you didn't start the IO, you *must* wait for it, so that you 
> > 	    end up returning EAGAIN atmost once! Exactly because 
> > 	    busy-looping is simply not acceptable behaviour!
> 
> (b) seems really ugly.  (a) is at least well-defined.  Either seems
> wrong, though.

I totally agree, b) would get nasty. And while a) isn't perfect by any
means, I do follow Linus' logic and agree it's probably the best (only?)
way to handle it.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux