Re: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks

Ingo Molnar
2000-09-28T15:13:59Z

On Thu, 28 Sep 2000, Andrea Arcangeli wrote:

> The DBMS uses shared SCSI disks across multiple hosts on the same SCSI
> bus and synchronize the distributed cache via TCP. Tell me how to do
> that with the OS cache and mmap.

this could be supported by:

1) mlock()-ing the whole mapping.

2) introducing sys_flush(), which flushes pages from the pagecache.

3) doing sys_msync() after dirtying a range and before sending a TCP
event.

Whenever the DB-cache-flush-event comes over TCP, it calls sys_flush() for
that given virtual address range or file address space range. Sys_flush
flushes the page from the pagecache and unmaps the address. Whenever it's
needed again by the application it will be faulted in and read from disk.

Can anyone see any problems with the concept of this approach? This can be
used for a page-granularity distributed IO cache.

(there are some smaller problems with this approach, like mlock() on a big
range can only be done by priviledged users, but thats not an issue IMO.)

Ingo