From: Stephen D. <sd...@gm...> - 2006-01-02 20:24:37
|
On 1/2/06, Vlad Seryakov <vl...@cr...> wrote: > I did very simple test, replaced write with aio_write and at the end > checked aio_error/aio_return, they all returned 0 so mmap should work > because file is synced. when i was doing aio_write i used aio_offset, so > each aio_write would put data into separate region on the file. > > Unfortunately i removed modified driver.c by accident, so i will have to > do it again but something is not right in simply replacing write with > aio_write and mmap. Without mmap, GetForm will have to read the file > manually and parse it, it makes it more complicated and still, if writes > are not complete we may get SIGBUS again. > > The problem i see here i cannot be sure that all writes are completed, > aio_error/aio_return are used to check only one last operation, not the > batch of writes. We might have to drop mmap support anyway. We're trying t accommodate large files, so we may run out of address space. This summer I was running thttpd to serve some iso images. I started getting busy errors when very little bandwidth was being used, and with only 3 concurrent users. It turns out that a couple of extra images were published, and the users were all downloading different ones. As thttpd uses mmap to read the files, the process ran out of address space. It doesn't take much... We still have to support mmap for reading in the case that a module calls Ns_ConContent(), but otherwise we can use read/write etc. |