* memory zone and slab @ 2013-03-07 14:35 ishare 2013-03-08 11:44 ` Mario Smarduch 0 siblings, 1 reply; 5+ messages in thread From: ishare @ 2013-03-07 14:35 UTC (permalink / raw) To: linux-newbie when does the memory zonelist initialized in kernel ? what is the difference between zonelists and slab for memory manage . are there some man docs or sites helpful to understand this ? thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: memory zone and slab 2013-03-07 14:35 memory zone and slab ishare @ 2013-03-08 11:44 ` Mario Smarduch 2013-03-09 2:04 ` ishare 0 siblings, 1 reply; 5+ messages in thread From: Mario Smarduch @ 2013-03-08 11:44 UTC (permalink / raw) To: ishare, linux-newbie@vger.kernel.org The zonelists are initialized in 'build_all_zonelists()' called by 'start_kernel()'. But prior to that point there is allot of other code that determines the various zones and holes a key function is free_area_init_node(). But that function will also reference prior initialization in 'setup_arch()' which may take you all the way back to bootloader to kernel interface. Nodes have zones, and zones define what the memory is appropriate for, DMA or lowmem, Normal memory or High memory for 32 bit. For 64 bit there are fewer zones just primarily 32 bit DMA and normal 64 bit. Zones are further divided into free areas of 2^n consecutive pages. Slabs are typically pages carved up into smaller units of allocations. There are several kernel books but outdated, but nevertheless good starting points, just search for 'Kernel Internals' BR, Mario. -----Original Message----- From: linux-newbie-owner@vger.kernel.org [mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of ishare Sent: Thursday, March 07, 2013 3:35 PM To: linux-newbie@vger.kernel.org Subject: memory zone and slab when does the memory zonelist initialized in kernel ? what is the difference between zonelists and slab for memory manage . are there some man docs or sites helpful to understand this ? thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: memory zone and slab 2013-03-08 11:44 ` Mario Smarduch @ 2013-03-09 2:04 ` ishare 2013-03-09 15:48 ` aktlin115 0 siblings, 1 reply; 5+ messages in thread From: ishare @ 2013-03-09 2:04 UTC (permalink / raw) To: Mario Smarduch; +Cc: linux-newbie On Fri, Mar 08, 2013 at 11:44:37AM +0000, Mario Smarduch wrote: > > The zonelists are initialized in 'build_all_zonelists()' > called by 'start_kernel()'. But prior to that point > there is allot of other code that determines the > various zones and holes a key function is free_area_init_node(). > But that function will also reference prior initialization > in 'setup_arch()' which may take you all the way back > to bootloader > Nodes have zones, and zones define what the memory is > appropriate for, DMA or lowmem, Normal memory or High memory > for 32 bit. For 64 bit there are fewer zones just primarily > 32 bit DMA and normal 64 bit. Zones are further divided > into free areas of 2^n consecutive pages. > > Slabs are typically pages carved up into smaller units of > allocations. Does this mean slab is based on zone ? slab is just a optimized algorithm for normal allocator? thanks! > There are several kernel books but outdated, but nevertheless good > starting points, just search for 'Kernel Internals' > > BR, > Mario. > > > -----Original Message----- > From: linux-newbie-owner@vger.kernel.org [mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of ishare > Sent: Thursday, March 07, 2013 3:35 PM > To: linux-newbie@vger.kernel.org > Subject: memory zone and slab > > > when does the memory zonelist initialized in kernel ? > > what is the difference between zonelists and slab for memory manage . > > are there some man docs or sites helpful to understand this ? > > thanks! > > -- > To unsubscribe from this list: send the line "unsubscribe linux-newbie" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.linux-learn.org/faqs -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: memory zone and slab 2013-03-09 2:04 ` ishare @ 2013-03-09 15:48 ` aktlin115 2013-03-10 7:04 ` ishare 0 siblings, 1 reply; 5+ messages in thread From: aktlin115 @ 2013-03-09 15:48 UTC (permalink / raw) To: ishare; +Cc: Mario Smarduch, linux-newbie Hi, I'm not sure I understand your question. The slab allocator groups objects into "caches". Each cache contains objects of the _same_ type. The area of memory that contains the cache is divided into "slabs" and each slab consists of one or more contiguous _pages_. If a page belongs to a slab it has the "PG_slab" page->flags bit set (see include/linux/page-flags.h). Pages tend to belong to a particular zone. I hope this helps. Kind regards, Aaron On Sat, Mar 9, 2013 at 2:04 AM, ishare <june.tune.sea@gmail.com> wrote: > On Fri, Mar 08, 2013 at 11:44:37AM +0000, Mario Smarduch wrote: >> >> The zonelists are initialized in 'build_all_zonelists()' >> called by 'start_kernel()'. But prior to that point >> there is allot of other code that determines the >> various zones and holes a key function is free_area_init_node(). >> But that function will also reference prior initialization >> in 'setup_arch()' which may take you all the way back >> to bootloader >> Nodes have zones, and zones define what the memory is >> appropriate for, DMA or lowmem, Normal memory or High memory >> for 32 bit. For 64 bit there are fewer zones just primarily >> 32 bit DMA and normal 64 bit. Zones are further divided >> into free areas of 2^n consecutive pages. >> >> Slabs are typically pages carved up into smaller units of >> allocations. > > Does this mean slab is based on zone ? > slab is just a optimized algorithm for normal allocator? > > thanks! > > > > > >> There are several kernel books but outdated, but nevertheless good >> starting points, just search for 'Kernel Internals' >> >> BR, >> Mario. >> >> >> -----Original Message----- >> From: linux-newbie-owner@vger.kernel.org [mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of ishare >> Sent: Thursday, March 07, 2013 3:35 PM >> To: linux-newbie@vger.kernel.org >> Subject: memory zone and slab >> >> >> when does the memory zonelist initialized in kernel ? >> >> what is the difference between zonelists and slab for memory manage . >> >> are there some man docs or sites helpful to understand this ? >> >> thanks! >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.linux-learn.org/faqs > -- > To unsubscribe from this list: send the line "unsubscribe linux-newbie" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.linux-learn.org/faqs -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: memory zone and slab 2013-03-09 15:48 ` aktlin115 @ 2013-03-10 7:04 ` ishare 0 siblings, 0 replies; 5+ messages in thread From: ishare @ 2013-03-10 7:04 UTC (permalink / raw) To: aktlin115; +Cc: linux-newbie what is the relationship between NUMA and slab memory-manage algorithm? thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-10 7:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-07 14:35 memory zone and slab ishare 2013-03-08 11:44 ` Mario Smarduch 2013-03-09 2:04 ` ishare 2013-03-09 15:48 ` aktlin115 2013-03-10 7:04 ` ishare
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox