Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:43:50
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:slab_memory_callback

Proto:static int __meminit slab_memory_callback(struct notifier_block *self, unsigned long action, void *arg)

Type:int

Parameter:

TypeParameterName
struct notifier_block *self
unsigned longaction
void *arg
1169  mnb = arg
1170  ret = 0
1173  nid = status_change_nid
1174  If nid < 0 Then Go to out
1178  Case action == MEM_GOING_ONLINE
1179  mutex_lock( & slab_mutex)
1180  ret = Allocates and initializes node for a node on each slab cache, used for* either memory or cpu hotplug
1181  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1182  Break
1183  Case action == xposed to userspace
1184  mutex_lock( & slab_mutex)
1185  ret = Drains freelist for a node on each slab cache, used for memory hot-remove.* Returns -EBUSY if all objects cannot be drained so that the node is not* removed.* Must hold slab_mutex.
1186  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1187  Break
1188  Case action == xposed to userspace
1189  Case action == xposed to userspace
1190  Case action == MEM_CANCEL_ONLINE
1191  Case action == MEM_CANCEL_OFFLINE
1192  Break
1194  out :
1195  Return Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM).