Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-28 15:25:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Delete the specified range [f, t) from the reserve map. If the* t parameter is LONG_MAX, this indicates that ALL regions after f* should be deleted. Locate the regions which intersect [f, t)* and either trim, delete or split the existing regions.

Proto:static long region_del(struct resv_map *resv, long f, long t)

Type:long

Parameter:

TypeParameterName
struct resv_map *resv
longf
longt
441  head = regions
443  struct file_region * nrg = NULL
444  del = 0
446  retry :
447  spin_lock( & lock)
456  If to <= f && ( to != from || to != f ) Then Continue
459  If from >= t Then Break
462  If f > from && t < to Then
467  If Not nrg && region_cache_count > adds_in_progress Then
476  If Not nrg Then
477  spin_unlock( & lock)
478  nrg = kmalloc( size of nrg , GFP_KERNEL)
479  If Not nrg Then Return -ENOMEM
481  Go to retry
484  del += t - f
487  from = t
488  to = to
489  Initialization list head
492  to = f
494  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
495  nrg = NULL
496  Break
499  If f <= from && t >= to Then
500  del += to - from
501  deletes entry from list
502  kfree(rg)
503  Continue
506  If f <= from Then
507  del += t - from
508  from = t
509  Else
510  del += to - f
511  to = f
515  spin_unlock( & lock)
516  kfree(nrg)
517  Return del
Caller
NameDescribe
resv_map_release
__vma_reservation_common
hugetlb_unreserve_pages