[haiku-gsoc] Re: vm_store_anonymous

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Tue, 27 May 2008 23:18:30 +0200

On 2008-05-27 at 17:01:23 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > Come to think of it, we need to disable the file cache for the swap
> > file or
> > have it operate in a special mode. Axel, do you have anything special
> > in mind?
> 
> While O_NOCACHE has not yet been implemented, it's also thought for
> this case.
> I haven't thought it through, but basically, the whole file map has to
> be cached upfront then, so that no allocations will be necessary
> anymore when touching the swap file.
> I may add a call to the file cache API that triggers just that, so that
> the file system can then use it on open() when O_NOCACHE has been
> specified.

Sounds good. We should probably also prevent other open()s from succeeding. 
I guess locking the node should do the trick.

CU, Ingo

Other related posts: