Subject: Re: HSM implementation proposal
To: Ty Sarna <tsarna@endicor.com>
From: Henry W Miller <mill0440@gold.tc.umn.edu>
List: tech-kern
Date: 12/06/1997 12:18:00
On Fri, 5 Dec 1997, Ty Sarna wrote:
> Jason Thorpe wrote:
> > The way NAStore currently works is that blocking is only required if
> > you read past the portion of the file that has already been restored.
>
> Hmm. That's nice, but I'd still want optional nonblock semantics on
> reads, then. That way an application can read as much as is currently
> availible without risk of hanging itself for a long time, or it can give
> the user status updates on how it's progressing, etc.
Along with non-block reads there is anouther potentiol problem to
consider: I was told when I first started using files that read(x) [ there
is anotuehr parameter for a buffer, but I can't recall read schematics off
the top of my head] would ALWAYS read x bytes, and return x. The only
exception was when dealing with sockets. I wrote several programs, for
class, that relied on this behavor. However an HSM file system may need
to block read for a long time, thus if I try to read 1500 bytes, and only
500 are avaibal it would return 500 bytes. There may be programs out
there that do not handle this situation. Word needs to get out that
reling on this feature is about to break programs. (even if it is only
student programs, I'd hope real world programmers don't do this, but now
it is critical to not teach this bad habbit)
I don't agree with wanting non-blocking, since it will probably be sued
for polling, (though I agree there needs to be a way to ask for a file to
be moved to local storage, and programs cannot block for that long)
however the alternatives I see are requesting a read, and then a signal
when the read is ready to complete, or a theading model that allows one
thread to block while anotuer goes about working. I like the second one
better, but both of them require major kernel modifications that I don't
think we are ready for. If anyone can come up with an ellegant
alternative to wasting cycles polling, that won't break existing programs
please do.
--
( \ / ) Henry Miller
|\ ) ) _,,,/ (,,_ mill0440@gold.tc.umn.edu
/, .-'`~ ~-. ;-;;,_ http://www.tc.umn.edu/nlhome/g639/mill0440/
|,4o -,_. , ( `'-'
'-~~''(_/~~' `-'\_)