[lc-devel] 2.4.10 and Swap Type
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@im...> - 2001-10-08 17:27:35
|
Hello, I noticed some problems when running our latest patch under UML. It is caused by the changes with respect to MAX_SWAPFILES in 2.4.10. The maximum number of swap files has increased from 8 to 32. Our virtual swap entry was using swap type == MAX_SWAPFILES, but that's not safe, because some architectures, like UML, the swap entry can be enconded in a different way than in i386. In the UML case, if we use swap type == MAX_SWAPFILES, it will be enconded in a manner that the pte set to a swap entry will be returned as being present in memory (because the encode with this swap type will be the same as setting the _PAGE_PROTNONE bit on). And this, of course, is incorrect, leading to memory corruption. If you have any trouble running the latest patch under UML (or any architecture, but I don't think it works in any other arch), please apply the 2.4.10-0.20pre2 that is available on our download page. There's no problem with 2.4.10-0.19 on i386. Download Page: http://sourceforge.net/project/showfiles.php?group_id=13472 Direct Link: http://prdownloads.sourceforge.net/linuxcompressed/patch-comp-cache-2.4.10-0.20pre2.bz2 Unfortunately the maximum number of swap files is not any longer 32. It is 31, and one type (the last index) has been used for our virtual addressing. So, the current setup is: #define MAX_SWAPFILES 31 // (indexes from 0 to 30) #define COMP_CACHE_SWP_TYPE MAX_SWAPFILES // (index 31) This setup implies that we won't have to rely on the architecture swap entry enconding. However we will have to spend a swap file for that. Regards, -- Rodrigo S. de Castro <rc...@im...> |