Re: explicit dcache <-> user-space cache coherency, sys_mark_dir_clean(), O_CLEAN

Miquel van Smoorenburg
2004-02-22T16:55:17Z

In article <20040222150753.GB25664@mail.shareable.org>,
Jamie Lokier <jamie@shareable.org> wrote:
>Christer Weinigel wrote:
>> > long sys_mark_dir_clean(dirfd);
>> >
>> > the syscall returns whether the directory was valid/clean already.
>>
>> Isn't this rather bad, it's only possible to have one process that
>> does this magic clean bit thing. Other applications such as Wine or
>> a DOS emulator might want to get the same speedups.
>
>No. The magic clean bit is associated with dirfd - different file
>descriptors have separate magic clean bits.
>
>> Add a new create syscall with the same idea as your one bit syscall,
>> which checks that the generation number matches. If the generation
>> number doesn't match the create call fails.
>>
>> int create_synchronized(name, mode, generation);
>
>Hmm. That's an interesting idea.

Generalize it. sys_set_required_generation(generation) - works
with all create/rename/delete/link calls. Setting it to zero
turns it off.

Mike.