mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	zsmalloc: introduce zspage structure
We have squeezed meta data of zspage into first page's descriptor. So, to get meta data from subpage, we should get first page first of all. But it makes trouble to implment page migration feature of zsmalloc because any place where to get first page from subpage can be raced with first page migration. IOW, first page it got could be stale. For preventing it, I have tried several approahces but it made code complicated so finally, I concluded to separate metadata from first page. Of course, it consumes more memory. IOW, 16bytes per zspage on 32bit at the moment. It means we lost 1% at *worst case*(40B/4096B) which is not bad I think at the cost of maintenance. Link: http://lkml.kernel.org/r/1464736881-24886-9-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim <minchan@kernel.org> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									bdb0af7ca8
								
							
						
					
					
						commit
						3783689a1a
					
				
					 2 changed files with 242 additions and 290 deletions
				
			
		|  | @ -15,7 +15,6 @@ | |||
| #include <linux/backing-dev.h> | ||||
| #include <linux/sysctl.h> | ||||
| #include <linux/sysfs.h> | ||||
| #include <linux/balloon_compaction.h> | ||||
| #include <linux/page-isolation.h> | ||||
| #include <linux/kasan.h> | ||||
| #include <linux/kthread.h> | ||||
|  |  | |||
							
								
								
									
										531
									
								
								mm/zsmalloc.c
									
										
									
									
									
								
							
							
						
						
									
										531
									
								
								mm/zsmalloc.c
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Minchan Kim
						Minchan Kim