[lc-devel] Compressed Cache for 2.6 kernels - Initial Design
Status: Beta
Brought to you by:
nitin_sf
From: Nitin G. <nit...@gm...> - 2006-01-13 20:06:04
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <p class="MsoNormal"><span style="font-size: 20pt;"><o:p></o:p>Compressed Cache<o:p></o:p></span></p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><span style="font-size: 14pt;">Initial Design (for 2.6 kernels)<o:p></o:p></span></p> <br> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><span style="font-size: 14pt;">Nitin Gupta<o:p></o:p></span></p> </div> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;">This document describes initial design ideas for the compressed cache for 2.6 kernels. Some of the ideas are based on the previous implementation and various other sources. Nothing has yet been implemented. We have decided to completely re-write previous implementation to have maximum flexibility to try out new ideas and take optimum advantage of many new features 2.6 kernels provide. Your feedback shall be really helpful.</p> </div> <p class="MsoNormal">The development will be based on vanilla kernels only.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><u><span style="font-size: 16pt;">General Background<o:p></o:p></span></u></p> <p class="MsoNormal"><o:p> </o:p><br> The system maintains two LRU lists – active and inactive LRU lists. These lists may contain both page-cache (file backed) and swap-cache (anonymous) pages. When under memory pressure, pages in inactive list are freed as:</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->swap-cache pages are written out to swap disks using swapper_space writepage() (swap_writepage()).</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Dirty page-cache pages are flushed to filesystem disks using filesystem specific writepage().</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Clean page-cache pages are simply freed.</p> <p class="MsoNormal"><o:p> </o:p><br> For compressed cache to be effective, it needs to store both swap-cache and page-cache (clean and dirty) pages. So, a way needed transparently (i.e. changes should be required within VMM subsystem itself) take these pages in/out of compressed cache.</p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><o:p> </o:p></p> </div> <p class="MsoNormal"><o:p> </o:p><br> <span style="font-size: 14pt;">During Swap-Out</span></p> <p class="MsoNormal"><o:p> </o:p>shrink_cache() prepares a list of pages to be freed (these pages are from inactive list) and hands over this list to shrink_list() which then tries to free pages in the list, a page at-a-time handling swap-cache pages and (clean/dirty) page-cache pages as above.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:567.75pt; height:255.75pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image001.png" o:title=""/> </v:shape><![endif]--><!--[if ! vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1025" height="341" width="757"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:384pt;height:203.25pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image003.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1026" height="271" width="512"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><span style="font-size: 14pt;">During Swap-In<o:p></o:p></span></p> <p class="MsoNormal"><b style=""><span style="font-size: 14pt;"><o:p></o:p></span></b><br> If page is anonymous, <b style="">do_swap_page()</b> looks-up swap cache first (using swp_entry_t stored in pte as key), if not in swap cache the required page is read in from swap disk (with some readahead), added to swap cache and the page is returned (mapped to process’ VMA).</p> <p class="MsoNormal"><o:p></o:p>For file-backed pages same logic applies (<b style="">do_file_page()</b>):</p> <p class="MsoNormal">If page is file backed, page cache is looked up first (using offset within file stored in pte as key), if not in page cache the required page is read in from filesystem disk (with some readahead), added to page cache and returned (mapped to process’ VMA).</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:367.5pt;height:225pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image005.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1027" height="300" width="490"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;">What kind of pages have pt_none(*pte) true ?</p> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><o:p> </o:p></p> </div> <p class="MsoNormal"><b style=""><span style="font-size: 14pt;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><u><span style="font-size: 16pt;">Handling Page Cache pages<o:p></o:p></span></u></p> <p class="MsoNormal"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal"><u>Taking page cache pages to compressed cache<o:p></o:p></u></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:416.25pt;height:249pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image007.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1028" height="332" width="555"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This is discussed in detail below.</p> <p class="MsoNormal">CCache heuristic is responsible to determine if adding the page to compressed cache is worth it. This is where compressed cache adaptivity behaviour will be implemented.</p> <p class="MsoNormal">Before I discuss how I intend to implement data structures for ccache lookup and storage, following gives a brief view of how page cache and swap cache are maintained in 2.6 kernels.</p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><o:p> </o:p></p> </div> <p class="MsoNormal"><u><o:p><span style="text-decoration: none;"><br> </span></o:p></u></p> <p class="MsoNormal"><u>About Page Cache<o:p></o:p></u></p> <p class="MsoNormal" style="">Please see: <a href="http://www.linuxsymposium.org/2005/linuxsymposium_procv2.pdf">http://www.linuxsymposium.org/2005/linuxsymposium_procv2.pdf</a><span style=""> </span>-- paper ‘Examining Linux 2.6 Page-Cache Performance’.</p> <p class="MsoNormal">Each open file has a separate radix tree to maintain its pages in page cache. So, in effect, each open file has its own page cache. The offset within the file is used as key to locate the corresponding page in memory.</p> <p class="MsoNormal"><u>About Swap Cache<o:p></o:p></u></p> <p class="MsoNormal">All swap cache pages are part of a single swapper_space – a single radix tree maintains all pages in the swap cache. swp_entry_t is used as a key to locate the corresponding pages in memory.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:425.25pt;height:104.25pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image009.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1029" border="0" height="139" width="567"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">type identifies things we can swap to.</p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><o:p><br> </o:p></p> </div> <p class="MsoNormal"><b style="">Now, to handle page cache pages<o:p></o:p></b></p> <p class="MsoNormal">When page is to be flushed to disk (dirty) or just freed (clean), determine if it is to be added to compressed cache (ccache_heuristic()). If yes, then compress it (compress_page()) and add to compressed cache (add_to_ccache()).</p> <p class="MsoNormal">add_to_ccache() will not maintain separate data structures to maintain location of various pages in ccache. Instead it will modify the radix tree node to now point to a new struct page which will contain all the information needed to locate the page in ccache. This new struct page will also have a flag (PG_compressed – a new page flag we will define) set to identify that it does not point to a real page but is a container for information required to locate it in ccache (compare this with buffer heads – very similar thing).</p> <p class="MsoNormal">So, when a page is looked-up up in page cache, it is determined if it is ccache just by checking PG_compressed flag. In that case the struct page contains information to locate the corres. page in ccache. The page will be taken from the ccache, decompressed to a page (newly allocated), and radix tree node will again be made to point to this newly decompressed page.</p> <o:p> </o:p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" style='width:645.75pt;height:297.75pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image011.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1030" border="0" height="397" width="861"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style='width:553.5pt;height:270.75pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image013.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1031" border="0" height="361" width="738"><!--[endif]--></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This approach eliminates the need for double lookups. If a page is not in page-cache, it need not be searched again (in whatever data structure that could have been used to maintain location information for ccache) to see if it is in ccache. We just need to check PG_compressed flag to determine if its in ccache. Also, if this flag is set, the corres. struct page now has all the info reqd to locate the page in ccache.</p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"> <p class="MsoNormal" style="border: medium none ; padding: 0in;"><o:p> </o:p></p> </div> <p class="MsoNormal"><o:p><br> </o:p></p> <p class="MsoNormal"><u><span style="font-size: 16pt;">Handling Swap Cache pages<o:p></o:p></span></u></p> <p class="MsoNormal">We could have taken completely analogous approach to handle swap cache pages i.e.: </p> <p class="MsoNormal">When a swap cache page is to be moved to swap disk, mark it as PG_compressed, modify node as above to now point to a new struct page which contains all info to locate page in ccache. When page is again looked-up in swap cache during page fault, simply note if PG_compressed is set and decompress, clear PG_compressed, set node to again point to this decompressed page and return this page.</p> <p class="MsoNormal">But this has some problems:</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->If swap support has been disabled (!CONFIG_SWAP) there is no swap cache.</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->If we force CONFIG_SWAP to be always defined, then also we have problem. In this case, the key value for tree lookup (swp_entry_t) will used by both ccache and swap cache (if present). Thus we have problem of running out of swap addresses even if we have tones of swap disk space available (previous implementation used ‘virtual swap’ addressing but I have not studied it).</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Entire swap handling code is a big heuristic that aims to minimize disk seeks – disk seeks are not our problem. If we depend on this swap code to provide us the key values(swp_entry_t) we’ll have to use existing code while we have totally different criteria of which pages to swap out, how much and which pages to read in during swap-in readahead etc.</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->If we implement our own algorithm to determine these key values in cases we want to move page to ccache, we will have collisions with key values generated by swap code. To avoid these collisions we can store location information for ccache (for swap cache) separately than swapper_space but that will force us to do double lookups – if a page is not in swap cache, look in ccache too – this is not good.</p> <br> <b style="">Solution<o:p></o:p></b> <p class="MsoNormal">I have no real solution yet. But what we want is this:</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Keep ccache working even if no swap disk is present</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Don’t allow algorithms implemented for swap disks affect which pages go to cccahe i.e. implement different algorithms to determine how many pages from inactive LRU to move to ccache, which pages to read in during swapin readahead etc.</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Avoid double lookups i.e. – if page is not in swap cache check in ccache – this, I think, can always be avoided.</p> <p class="MsoNormal"><br> Following is a possible solution to all above problems. It might not even be a solution; I have not thought it out in detail:</p> <p class="MsoNormal">We have MAX_SWAPFILES (default 32) swap disks differentiated using ‘type’ field (5 bits) in swp_entry_t. Mark one (or some) of them as ‘virtual swap disks’ and assign it the highest priority of all swap disks. The swapper_space radix tree can then be used for ccache too (i.e. no double lookups). This will also allow us to switch swapping algorithms based on ‘kind’ of swap disk. We can then use rest of 27 bits as index into ccache.</p> <p class="MsoNormal">One initial problem is – we need <struct page, start offset, end offset> to locate a page in ccache and we have 27 bits only, so we can’t even store pointer to a struct containing all this info. </p> <p class="MsoNormal">This way, we’ll be sure that we never collide ccache keys with swap disk keys (‘segment’ no. in swap disk) in swapper_space radix tree since real and virtual swap disks use different ‘type’ field (and ‘swp_entry_t’ is a combination of ‘type’ and ‘offset’ fields).</p> <div style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 1pt; padding: 0in 0in 1pt;"><o:p> </o:p> </div> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><u><span style="font-size: 16pt;">Compressed Cache Structure<o:p></o:p></span></u></p> <p class="MsoNormal">Previous implementation has a 2-page cell structure for compressed cache. Please see: <a href="http://linuxcompressed.sourceforge.net/files/docs/paper.pdf">http://linuxcompressed.sourceforge.net/files/docs/paper.pdf</a> for details about this structure.</p> <p class="MsoNormal">Although this structure is result of extensive study and practical experience but I’ve been working on an alternate design for quite some time. These are the main problems I see with 2-page cell structure.<br> <br> -- Need to search for cell with total free space big enough to hold compressed page. <br> -- Need to do compaction when a page is taken out.<br> -- Under heavy memory load it can be difficult to allocate two contiguous pages.<br> -- Lock contention problems (haven't studied this well).<br> <br> The idea is to let a compressed page be written in chunks in the free areas as they occur in ccache. <br> <br> It will eliminate need for searching for free space when compressed page is to be written to ccache, no need for compaction and allocates single page at a time. <br> <br> Following describes the idea:<br> <br> --> <b style="">During page-in</b> (taking page out of ccache):<br> <br> -- Locate all the chunks associated with required page and decompress them.<br> -- Merge free chunks if found adjacent. Maintain a list of free chunks as <struct page, offset, len> (possibly maintain different list according to chunk sizes e.g. 'good'>=1/2*PAGE_SIZE, 'bad'>=1/4*PAGE_SIZE and the 'ugly' for chunks < bad).<br> -- If a "good" chunk was just freed, set this as 'start' position for write (writing compressed page in ccache). This will prevent searching free list every time from beginning which will otherwise cause fragmentation problem very severe. <br> <br> --> <b style="">During page-out</b> (storing page into ccache):<br> <br> -- Compress page and start writing out beginning with 'start' position (this is set during page-in and is at start of ccache initially).<br> -- Beginning with chunk at 'start', take more free chunks (without considering their size) from free list to write out compressed page. <br> -- To prevent "metadata madness" limit the no. of chunks per compressed page (say, MAX_CHUNKS=4).<br> -- If no. of chunks required > MAX_CHUNKS, simply write out the last chunk at 'tail' of ccache.<br> -- Fix-up the free list to reflect chunks used and space left over after the last chunk. <br> <br> This can (i'm not sure) also reduce lock contentions as locks can now be more fine grained.<br> <br> Though it causes space overhead due to need to maintain info about all the chunks (upto MAX_CHUNKS) associated with a compressed page, it should significantly improve speed -- it will eliminate need for searching for free space when compressed page is to be written to ccache, no need for compaction and allocates single page at a time. <br> </p> <p class="MsoNormal">Following shows a sample execution of this algorithm:</p> <p class="MsoNormal"><!--[if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" style='width:642pt;height:555.75pt'> <v:imagedata src="file:///C:\DOCUME~1\Nitin\LOCALS~1\Temp\msohtml1\01\clip_image015.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="cid:par...@gm..." v:shapes="_x0000_i1032" border="0" height="741" width="856"><!--[endif]--></p> <u><span style="font-size: 16pt;"><o:p><span style="text-decoration: none;"></span></o:p></span></u><u><span style="font-size: 16pt;"><br> <br> General Remarks<o:p></o:p></span><br> </u><br> <p class="MsoNormal" style="">There are some more things to consider. Some of these were also considered during previous implementation but I am not sure of the solutions:</p> <p class="MsoNormal" style=""><o:p> </o:p><br> -- Send pages to swap disk (when compressed cache is ‘full’ – reached some maximum size) as compressed or uncompressed? Previous implementation had option to send compressed pages to swap disk as is (with null-padding to align to page boundary in swap). This delayed decompressing page until really required. Goal of sending page to swap compressed is not to have space gains (null-padding has been done) but to avoid unnecessary overhead.</p> <p class="MsoNormal" style="">-- As described in this document, the compressed cache will be maintained separately for swap cache and page cache pages. This has the benefit of simplified design, reduced lock contention and should be also useful to have a more effective heuristic which can now treat swap and page cache pages separately.</p> <p class="MsoNormal" style="">-- Also mentioned in this document that pages will be placed (compressed and chunked-out) in ccache asynchronously.</p> <p class="MsoNormal" style="">-- I am not clear on how to allow compression algorithm to be changed at runtime.</p> <p class="MsoNormal" style="">-- Can compressed cache also have uncompressed pages (for pages that are uncompressible)?</p> <p class="MsoNormal" style="">-- Compression algorithm? Wk4x4 / LZO / ?</p> <p class="MsoNormal" style="">-- Implementing above ccache structure (if we really decide that it’s actually good) will be hard. Implementing 2-page cell structure is not trivial either. What structure do you think we should begin implementing?</p> <p class="MsoNormal" style="">I think for initial implementation, we can try handling only page cache pages (as it turns out that we have confusion over how to handle swap cache pages). Since we’re maintaining compressed cache for page cache and swap cache separately, this initial implementation will not cause deviation from the design.</p> <br> </body> </html> |