bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ext2fs and large stores (> 1.5G)


From: Ognyan Kulev
Subject: Re: [PATCH] ext2fs and large stores (> 1.5G)
Date: Fri, 02 May 2003 21:51:25 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030430 Debian/1.3-5

Neal H. Walfield wrote:

When pager_flush_some is called by thread A, the mutex is unlocked (as
pager_flush_some can take a long time).  Thus, although the kernel
will return the page to the server (and invalidate any extant
mappings), it may immediately rerequest (i.e. before thread A has
required the lock) because some other thread, B, has obtained the lock
and faulted it in.

Thanks for the explanation :-)

Whatever.  It was my bug that mislead me and the second alpha release
solve it (though not perfectly).

Can you describe the problem you are having?

disk_image_bptr vector maps block number to memory address. When I reuse block in the cache I make the new block to map to the same address. The bug was that the old block continued to map to the address, thus one memory page is pointed by two disk blocks in disk_image_bptr.

Of course, the solution is to remove the mapping between the old block and the memory page. Unfortunately, some functions can think that this block is still in memory and expect valid pointer from boffs_ptr but they receive NULL. Speaking with facts, extfs.h:record_global_poke does this. The solution (that I'm not sure that it's perfect) is to check in pokel_add if LOC is NULL. No other function experiences such problem in my tests.

Remembering blocks and pointers to the cache is harmless. Outside request-release barriers these pointers/blocks are used only in syncing and flushing, and there is no harm to sync or flush another block (even if it's dirty). The special case are dirty blocks. Of course, they are never reused until disk_image_clear is called.

I hope these explanations wasn't too vague. In short: I'm not considering the question what to do with remembered block numbers and pointers to be closed. Some cases are solved. It's possible that there are others. That's why I call it "Alpha releases" :-)

Regards
--
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""





reply via email to

[Prev in Thread] Current Thread [Next in Thread]