The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > SuSE
.
google unix.com



SuSE SUSE Linux is a major operating system. The developer rights are owned by Novell, Inc.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SuSE Linux Kernel & Veritas MultiNIC Configuration...!!! jumadhiya SuSE 1 02-29-2008 07:46 AM
Much time in insmod of huge kernel module ptprabu High Level Programming 0 11-28-2007 11:48 AM
kernel-kernel call communication aureliano High Level Programming 5 06-05-2007 05:48 PM
Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU dave043 Linux 2 05-10-2007 01:57 AM
Making Socket System Call From Linux Kernel Module? mian_m_hamayun Linux 0 04-06-2005 09:34 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-21-2008
Brendan Kennedy Brendan Kennedy is offline
Registered User
  
 

Join Date: May 2007
Posts: 7
max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All,

Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff.

Cheers,
Brendan
  #2 (permalink)  
Old 01-21-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
There is no arbitrary limit on the number of slabs that a kernel routine (whether or not it is a module) can use, but no computer has an infinite amount of memory either. Zones are different than slabs. Memory locations have an address and not all addresses are identical in nature. This stuff varies greatly depending on the cpu. As an example, on a typical Pentium, ZONE_DMA memory has an addresss below 16 MB and is usable for DMA transfers. There are only a very few zones. This stuff is documented in "Understanding the Linux Kernel", by Bovet and Cesati, ISBN 0-596-00565-2.
  #3 (permalink)  
Old 01-22-2008
Brendan Kennedy Brendan Kennedy is offline
Registered User
  
 

Join Date: May 2007
Posts: 7
Thanks for the clarification Perderabo! I don't know why I got to thinking of slab spaces as 'zones'. I think I'll buy that book too...

I am aware that there is a limited amount of memory space, however is it not more efficient to use slabs (especially for allocations in the data path) since they result in less fragmentation and unused pages are reclaimed by the kernel anyway?
  #4 (permalink)  
Old 01-22-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Not sure I follow you... more efficient than what? It sounds like you're still trying to compare slabs to zones. (That's like comparing TCP to ethernet.) But yes, slabs are efficient and tend to result in less fragmentation. However that "unused pages..." comment is off the mark. A freed slab tends to stay in its cache ready to be allocated again. Please read the book...I don't want to type the whole thing in. When you do, skip to page 329 "Interfacing the Slab Allocator with the Zoned Page Frame Allocator".
  #5 (permalink)  
Old 01-23-2008
Brendan Kennedy Brendan Kennedy is offline
Registered User
  
 

Join Date: May 2007
Posts: 7
eh, ye tcp to ethernet... I wouldn't say I'm an expert or anything.

As regards to free pages - they may tend to stay available in the short term but they do eventually get reclaimed. I would agree it's not immediate though.

Thanks, I'll read your reference when I get my hands on the book!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:56 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0