Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-iv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-iv
  • Repository
Switch branch/tag
  • linux-iv
  • include
  • linux
  • slab_def.h
Find file BlameHistoryPermalink
  • Eric Dumazet's avatar
    slab: shrink sizeof(struct kmem_cache) · b56efcf0
    Eric Dumazet authored Jul 20, 2011
    
    
    Reduce high order allocations for some setups.
    (NR_CPUS=4096 -> we need 64KB per kmem_cache struct)
    
    We now allocate exact needed size (using nr_cpu_ids and nr_node_ids)
    
    This also makes code a bit smaller on x86_64, since some field offsets
    are less than the 127 limit :
    
    Before patch :
    # size mm/slab.o
       text    data     bss     dec     hex filename
      22605  361665      32  384302   5dd2e mm/slab.o
    
    After patch :
    # size mm/slab.o
       text    data     bss     dec     hex filename
      22349	 353473	   8224	 384046	  5dc2e	mm/slab.o
    
    CC: Andrew Morton <akpm@linux-foundation.org>
    Reported-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
    Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Acked-by: default avatarChristoph Lameter <cl@linux.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    b56efcf0