[haiku-gsoc] Re: [HCD]: Bfs bug #1

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Tue, 24 Jun 2008 12:21:45 +0200 CEST

"Salvatore Benedetto" <emitrax@xxxxxxxxx> wrote:
> 2008/6/23 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> > We might want to update the wait time if any more pages could be
> > written back, but we definitely shouldn't wait forever for it to
> > happen
> Are you talking about the one in get_vnode? wouldn't it be better to
> simply hanlde the E_BUSY error differently?

Not sure what you mean.
BTW it's either EBUSY or B_BUSY :-)

> > - it's not acceptable to kill the system upon an I/O error.
> I agree.
>
> How about instead a mechanism that temporarely increases the priority
> of the low memory handler along with the page writer in situation
> like this?
> As I pointed out, I've noticed the page writer waiting for the low
> memory thread
> to finish, but with the latest being unable to do so due to the
> application that keeps
> running and consuming memory (tar in this example) with an higher
> priority.

That's definitely a problem right now, but this will go away once we
have an I/O scheduler. We could make the priority of the free/write
stuff higher right now, but it probably wouldn't feel that good most of
the time, IIRC, but maybe it's worth to try that again.
The idea behind it now was that even higher priority threads will have
to wait for memory, and then the lower priority threads can get them
what they need. There is surely room for improvements, though :-)

> > In any case, it's probably a good idea to improve the low memory
> > handler that it will only pick clean vnodes.
> Trying to keep up here sorry, by clean you mean?

A dirty page is a page that hasn't been written back yet, a clean page
has no pending changes.
Hence, a clean vnode is a vnode that has no dirty pages in its file
cache anymore.

Bye,
   Axel.


Other related posts: