Lines Matching refs:hstate
53 struct hstate hstates[HUGE_MAX_HSTATE];
74 static struct hstate * __initdata parsed_hstate;
94 static int hugetlb_acct_memory(struct hstate *h, long delta);
124 hugetlb_acct_memory(spool->hstate,
130 struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
142 spool->hstate = h;
466 struct hstate *h,
548 long to, struct hstate *h, struct hugetlb_cgroup *cg,
574 struct hstate *h, long *regions_needed)
706 long in_regions_needed, struct hstate *h,
942 struct hstate *h = hstate_inode(inode);
989 static pgoff_t vma_hugecache_offset(struct hstate *h,
1073 struct hstate *h)
1317 static void enqueue_hugetlb_folio(struct hstate *h, struct folio *folio)
1330 static struct folio *dequeue_hugetlb_folio_node_exact(struct hstate *h,
1355 static struct folio *dequeue_hugetlb_folio_nodemask(struct hstate *h, gfp_t gfp_mask,
1391 static unsigned long available_huge_pages(struct hstate *h)
1396 static struct folio *dequeue_hugetlb_folio_vma(struct hstate *h,
1474 static int hstate_next_node_to_alloc(struct hstate *h,
1493 static int hstate_next_node_to_free(struct hstate *h, nodemask_t *nodes_allowed)
1571 static struct folio *alloc_gigantic_folio(struct hstate *h, gfp_t gfp_mask,
1609 static struct folio *alloc_gigantic_folio(struct hstate *h, gfp_t gfp_mask,
1617 static struct folio *alloc_gigantic_folio(struct hstate *h, gfp_t gfp_mask,
1628 static inline void __clear_hugetlb_destructor(struct hstate *h,
1646 static void __remove_hugetlb_folio(struct hstate *h, struct folio *folio,
1689 static void remove_hugetlb_folio(struct hstate *h, struct folio *folio,
1695 static void remove_hugetlb_folio_for_demote(struct hstate *h, struct folio *folio,
1701 static void add_hugetlb_folio(struct hstate *h, struct folio *folio,
1747 static void __update_and_free_hugetlb_folio(struct hstate *h,
1825 struct hstate *h;
1846 static inline void flush_free_hpage_work(struct hstate *h)
1852 static void update_and_free_hugetlb_folio(struct hstate *h, struct folio *folio,
1871 static void update_and_free_pages_bulk(struct hstate *h, struct list_head *list)
1883 struct hstate *size_to_hstate(unsigned long size)
1885 struct hstate *h;
1897 * Can't pass hstate in here because it is called from the
1900 struct hstate *h = folio_hstate(folio);
1963 static void __prep_account_new_huge_page(struct hstate *h, int nid)
1970 static void __prep_new_hugetlb_folio(struct hstate *h, struct folio *folio)
1980 static void prep_new_hugetlb_folio(struct hstate *h, struct folio *folio, int nid)
2127 static struct folio *alloc_buddy_hugetlb_folio(struct hstate *h,
2197 static struct folio *alloc_fresh_hugetlb_folio(struct hstate *h,
2235 static int alloc_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed,
2261 static struct page *remove_pool_huge_page(struct hstate *h,
2319 struct hstate *h = folio_hstate(folio);
2385 struct hstate *h;
2407 static struct folio *alloc_surplus_hugetlb_folio(struct hstate *h,
2448 static struct folio *alloc_migrate_hugetlb_folio(struct hstate *h, gfp_t gfp_mask,
2475 struct folio *alloc_buddy_hugetlb_folio_with_mpol(struct hstate *h,
2502 struct folio *alloc_hugetlb_folio_nodemask(struct hstate *h, int preferred_nid,
2522 struct folio *alloc_hugetlb_folio_vma(struct hstate *h, struct vm_area_struct *vma,
2543 static int gather_surplus_pages(struct hstate *h, long delta)
2635 static void return_unused_surplus_pages(struct hstate *h,
2661 * on-line nodes with memory and will handle the hstate accounting.
2714 static long __vma_reservation_common(struct hstate *h,
2794 static long vma_needs_reservation(struct hstate *h,
2800 static long vma_commit_reservation(struct hstate *h,
2806 static void vma_end_reservation(struct hstate *h,
2812 static long vma_add_reservation(struct hstate *h,
2818 static long vma_del_reservation(struct hstate *h,
2844 void restore_reserve_on_error(struct hstate *h, struct vm_area_struct *vma,
2920 * @h: struct hstate old page belongs to
2925 static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
3010 struct hstate *h;
3048 struct hstate *h = hstate_vma(vma);
3175 int alloc_bootmem_huge_page(struct hstate *h, int nid)
3177 int __alloc_bootmem_huge_page(struct hstate *h, int nid)
3209 m->hstate = h;
3224 struct hstate *h = m->hstate;
3246 static void __init hugetlb_hstate_alloc_pages_onenode(struct hstate *h, int nid)
3277 static void __init hugetlb_hstate_alloc_pages(struct hstate *h)
3342 struct hstate *h, *h2;
3350 * Set demote order for each hstate. Note that
3373 struct hstate *h;
3387 static void try_to_free_low(struct hstate *h, unsigned long count,
3419 static inline void try_to_free_low(struct hstate *h, unsigned long count,
3430 static int adjust_pool_surplus(struct hstate *h, nodemask_t *nodes_allowed,
3459 static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid,
3479 * pages in hstate via the proc/sysfs interfaces.
3609 static int demote_free_hugetlb_folio(struct hstate *h, struct folio *folio)
3612 struct hstate *target_hstate;
3638 * Taking target hstate mutex synchronizes with set_max_huge_pages.
3639 * Without the mutex, pages added to target hstate could be marked
3643 * use the convention of always taking larger size hstate mutex first.
3674 static int demote_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed)
3715 static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp);
3717 static struct hstate *kobj_to_hstate(struct kobject *kobj, int *nidp)
3734 struct hstate *h;
3748 struct hstate *h, int nid,
3759 * global hstate attribute
3784 struct hstate *h;
3813 * hstate attribute for optionally mempolicy-based constraint on persistent
3835 struct hstate *h = kobj_to_hstate(kobj, NULL);
3844 struct hstate *h = kobj_to_hstate(kobj, NULL);
3864 struct hstate *h;
3881 struct hstate *h = kobj_to_hstate(kobj, NULL);
3889 struct hstate *h;
3909 struct hstate *h;
3961 struct hstate *h = kobj_to_hstate(kobj, NULL);
3971 struct hstate *h, *demote_hstate;
3984 /* demote order must be smaller than hstate order */
4024 static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent,
4061 * node_hstate/s - associate per node hstate attributes, via their kobjects,
4074 * A subset of global hstate attributes for node devices
4088 * kobj_to_node_hstate - lookup global hstate for node device hstate attr kobj.
4091 static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp)
4111 * Unregister hstate attributes from a single node device.
4112 * No-op if no hstate attributes attached.
4116 struct hstate *h;
4120 return; /* no hstate attributes */
4141 * Register hstate attributes for a single node device.
4146 struct hstate *h;
4166 pr_err("HugeTLB: Unable to add hstate %s for node %d\n",
4175 * hugetlb init time: register hstate attributes for all registered node
4188 static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp)
4210 struct hstate *h;
4221 pr_err("HugeTLB: Unable to add hstate %s", h->name);
4250 * Make sure HPAGE_SIZE (HUGETLB_PAGE_ORDER) hstate exists. Some
4257 * default_hstate_idx to HPAGE_SIZE hstate. And, if the
4317 struct hstate *h;
4382 * yet, so this hugepages= parameter goes to the "default hstate".
4460 struct hstate *h;
4473 * hstate for this size already exists. This is normally
4474 * an error, but is allowed if the existing hstate is the
4475 * default hstate. More specifically, it is only allowed if
4476 * the number of huge pages for the default hstate was not
4486 * No need to call hugetlb_add_hstate() as hstate already
4488 * hugepages= parameter will be applied to this hstate.
4566 static unsigned int allowed_mems_nr(struct hstate *h)
4604 struct hstate *h = &default_hstate;
4643 struct hstate *h = &default_hstate;
4711 struct hstate *h;
4741 struct hstate *h = &default_hstate;
4757 struct hstate *h;
4780 struct hstate *h;
4788 static int hugetlb_acct_memory(struct hstate *h, long delta)
4878 struct hstate *h = hstate_vma(vma);
5043 struct hstate *h = hstate_vma(src_vma);
5229 struct hstate *h = hstate_vma(vma);
5257 struct hstate *h = hstate_vma(vma);
5326 struct hstate *h = hstate_vma(vma);
5514 struct hstate *h = hstate_vma(vma);
5573 struct hstate *h = hstate_vma(vma);
5758 static bool hugetlbfs_pagecache_present(struct hstate *h,
5776 struct hstate *h = hstate_inode(inode);
5839 static bool hugetlb_pte_stable(struct hstate *h, struct mm_struct *mm,
5858 struct hstate *h = hstate_vma(vma);
6096 struct hstate *h = hstate_vma(vma);
6294 struct hstate *h = hstate_vma(dst_vma);
6499 struct hstate *h = hstate_vma(vma);
6574 struct hstate *h = hstate_vma(vma);
6716 struct hstate *h = hstate_inode(inode);
6873 struct hstate *h = hstate_inode(inode);
7177 unsigned long hugetlb_mask_last_page(struct hstate *h)
7192 __weak unsigned long hugetlb_mask_last_page(struct hstate *h)
7266 struct hstate *h = folio_hstate(old_folio);
7308 struct hstate *h = hstate_vma(vma);