slab/slub main data structures

name          <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
mlx5_fs_ftes     615            615       392         41            4        : tunables    0          0            0        : slabdata     15             15          0

crash> struct kmem_cache 0xffff8807fe2b6100
struct kmem_cache {
  cpu_slab = 0x60f80160ada0,
  flags = 0x40000000,
  min_partial = 0x5,
  size = 0x188,
  object_size = 0x188,       <== 0x188 = 392 objsize
  offset = 0x0,
  cpu_partial = 0xd,
  oo = {
    x = 0x20029
  },
  max = {
    x = 0x20029
  },
  min = {
    x = 0xa
  },
  allocflags = 0x4000,
  refcount = 0x5,
  ctor = 0x0,
  inuse = 0x188,
  align = 0x8,
  reserved = 0x0,
  red_left_pad = 0x0,
  name = 0xffff8807cdd3c350 "mlx5_fs_ftes",
  list = {
    next = 0xffff8807fe2b5e68,
    prev = 0xffff8807fe2b62e8
  },
  kobj = {
    name = 0xffff8807cdd3c340 ":0000392",
    entry = {
      next = 0xffff8807fe2b6300,
      prev = 0xffff8807fe2b5e80
    },
    parent = 0xffff8807da8ba4f8,
    kset = 0xffff8807da8ba4e0,
    ktype = 0xffffffff8206fd20 <slab_ktype>,
    sd = 0xffff8807d591d000,
    kref = {
      refcount = {
        refs = {
          counter = 0x1
        }
      }
    },
    state_initialized = 0x1,
    state_in_sysfs = 0x1,
    state_add_uevent_sent = 0x1,
    state_remove_uevent_sent = 0x0,
    uevent_suppress = 0x0
  },
  kobj_remove_work = {
    data = {
      counter = 0xfffffffe0
    },
    entry = {
      next = 0xffff8807fe2b61c0,
      prev = 0xffff8807fe2b61c0
    },
    func = 0xffffffff812081d0 <sysfs_slab_remove_workfn>
  },
  memcg_params = {
    root_cache = 0x0,
    {
      {
        memcg_caches = 0xffff8807274b89c0,
        __root_caches_node = {
          next = 0xffff8807fe2b5ee8,
          prev = 0xffff8807fe2b6368
        },
        children = {
          next = 0xffff8807fe2b61f8,
          prev = 0xffff8807fe2b61f8
        }
      },
      {
        memcg = 0xffff8807274b89c0,
        children_node = {
          next = 0xffff8807fe2b5ee8,
          prev = 0xffff8807fe2b6368
        },
        kmem_caches_node = {
          next = 0xffff8807fe2b61f8,
          prev = 0xffff8807fe2b61f8
        },
        deact_fn = 0x0,
        {
          deact_rcu_head = {
            next = 0x0,
            func = 0x0
          },
          deact_work = {
            data = {
              counter = 0x0
            },
            entry = {
              next = 0x0,
              prev = 0x0
            },
            func = 0x0
          }
        }
      }
    }
  },
  max_attr_size = 0x0,
  memcg_kset = 0x0,
  useroffset = 0x0,
  usersize = 0x0,
  node = {0xffff8807d3fb4000}
}
crash> struct kmem_cache_cpu 0x60f80160ada0:a
[0]: ffffe8ffffa0ada0
struct kmem_cache_cpu {
  freelist = 0xffff8807165bd3e8,
  tid = 0xc80,
  page = 0xffffea001c596f00,
  partial = 0x0
}
[1]: ffffe8ffffa4ada0
struct kmem_cache_cpu {
  freelist = 0xffff8807cccca338,
  tid = 0x8c1,
  page = 0xffffea001f333200,
  partial = 0x0
}
[2]: ffffe8ffffa8ada0
struct kmem_cache_cpu {
  freelist = 0xffff880731248498,
  tid = 0xc2,
  page = 0xffffea001cc49200,
  partial = 0x0
}
[3]: ffffe8ffffacada0
struct kmem_cache_cpu {
  freelist = 0xffff8807bc673410,
  tid = 0x883,
  page = 0xffffea001ef19c00,
  partial = 0x0
}
...
crash> struct kmem_cache_node 0xffff8807d3fb4000
struct kmem_cache_node {
  list_lock = {
    {
      rlock = {
        raw_lock = {
          val = {
            counter = 0x0
          }
        }
      }
    }
  },
  nr_partial = 0x0,
  partial = {
    next = 0xffff8807d3fb4010,
    prev = 0xffff8807d3fb4010
  },
  nr_slabs = {
    counter = 0xf      <=== 0xf = 15 num_slabs
  },
  total_objects = {
    counter = 0x267    <=== 0x267 = 615 num_objs
  },
  full = {
    next = 0xffff8807d3fb4030,
    prev = 0xffff8807d3fb4030
  }
}

crash> fs_fte ffff8807c993edf0
struct fs_fte {
  node = {
    list = {
      next = 0xffff8807c993ec68,
      prev = 0xffff88078ab0ecc0
    },
    children = {
      next = 0xffff8807d12c6d80,
      prev = 0xffff8807d12c6c00
    },
    type = FS_TYPE_FLOW_ENTRY,
    parent = 0xffff88078ab0ecb0,
    root = 0xffff8807ffa29400,
    lock = {
      count = {
        counter = 0x0
      },
      wait_list = {
        next = 0xffff8807c993ee30,
        prev = 0xffff8807c993ee30
      },
      wait_lock = {
        raw_lock = {
          val = {
            counter = 0x0
          }
        }
      },
      osq = {
        tail = {
          counter = 0x0
        }
      },
      owner = 0x0
    },
    refcount = {
      refs = {
        counter = 0x3
      }
    },
    active = 0x1,
    del_hw_func = 0xffffffffa0c66f50 <del_hw_fte>,
    del_sw_func = 0xffffffffa0c6a530 <del_sw_fte>,
    version = {
      counter = 0x1
    }
  },
  val = {0x13d02502, 0x80201, 0x13d02502, 0x301, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  dests_size = 0x3,
  index = 0x0,
  action = {
    action = 0xc,
    has_flow_tag = 0x0,
    flow_tag = 0x0,
    encap_id = 0x0,
    modify_id = 0x0,
    esp_id = 0x0,
    vlan = {
      ethtype = 0x0,
      vid = 0x0,
      prio = 0x0
    }
  },
  status = FS_FTE_STATUS_EXISTING,
  counter = 0x0,
  hash = {
    next = 0x5d
  }
}
crash> vtop ffff8807c993edf0
VIRTUAL           PHYSICAL
ffff8807c993edf0  7c993edf0

PGD DIRECTORY: ffffffff8200a000
PAGE DIRECTORY: 107f78b067
   PUD: 107f78b0f8 => 7dbde4063
   PMD: 7dbde4260 => 7d5be7063
   PTE: 7d5be79f0 => 80000007c993e063
  PAGE: 7c993e000

      PTE         PHYSICAL   FLAGS
80000007c993e063  7c993e000  (PRESENT|RW|ACCESSED|DIRTY|NX)

      PAGE        PHYSICAL      MAPPING       INDEX CNT FLAGS
ffffea001f264f80 7c993e000 dead000000000400        0  0 8000000000000000

# a=0xffff8807c993edf0; b=0x7c993edf0; printf -v c "%#x" $[a-b] ; echo $c
0xffff880000000000  <=== PAGE_OFFSET

crash> struct page.compound_head ffffea001f264f80
      compound_head = 0xffffea001f264f01
crash> struct page 0xffffea001f264f00
struct page {
  flags = 0x8000000000008100,
  {
    mapping = 0x0,
    s_mem = 0x0,
    compound_mapcount = {
      counter = 0x0
    }
  },
  {
    index = 0x0,
    freelist = 0x0
  },
  {
    counters = 0x180290029,
    active = 0x80290029,
    {
      inuse = 0x29,
      objects = 0x29,         <=== 0x29 = 41 objperslab
      frozen = 0x1
    },
    units = 0x80290029,
    {
      _mapcount = {
        counter = 0x80290029
      },
      _refcount = {
        counter = 0x1
      }
    }
  },
  {
    lru = {
      next = 0xdead000000000100,
      prev = 0xdead000000000200
    },
    pgmap = 0xdead000000000100,
    {
      next = 0xdead000000000100,
      pages = 0x200,
      pobjects = 0xdead0000
    },
    callback_head = {
      next = 0xdead000000000100,
      func = 0xdead000000000200
    },
    {
      compound_head = 0xdead000000000100,
      compound_dtor = 0x0,
      compound_order = 0x2
    },
    {
      __pad = 0xdead000000000100,
      pmd_huge_pte = 0xdead000000000200
    }
  },
  {
    private = 0xffff8807fe2b6100,
    ptl = {
      {
        rlock = {
          raw_lock = {
            val = {
              counter = 0xfe2b6100
            }
          }
        }
      }
    },
    slab_cache = 0xffff8807fe2b6100    <=== address of struct kmem_cache at the beginning
  },
  mem_cgroup = 0x0
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值