Lines Matching +full:no +full:- +full:map

13 to be used.  If no huge page exists at page fault time, the task is sent
36 This is a global (per-hstate) count of reserved huge pages. Reserved
39 as (``free_huge_pages - resv_huge_pages``).
40 Reserve Map
41 A reserve map is described by the structure::
52 There is one reserve map for each huge page mapping in the system.
67 These are stored in the bottom bits of the reservation map pointer.
82 Reservation Map Location (Private or Shared)
88 semantics of the reservation map is significantly different for the two types
91 - For private mappings, the reservation map hangs off the VMA structure.
92 Specifically, vma->vm_private_data. This reserve map is created at the
94 - For shared mappings, the reservation map hangs off the inode. Specifically,
95 inode->i_mapping->private_data. Since shared mappings are always backed
97 contains a reservation map. As a result, the reservation map is allocated
114 was specified, then this routine returns immediately as no reservations
124 in which reservations are represented in the reservation map.
126 - For shared mappings, an entry in the reservation map indicates a reservation
128 consumed, the reservation map is not modified.
129 - For private mappings, the lack of an entry in the reservation map indicates
131 consumed, entries are added to the reservation map. Therefore, the
132 reservation map can also be used to determine which reservations have
135 For private mappings, hugetlb_reserve_pages() creates the reservation map and
139 The reservation map is consulted to determine how many huge page reservations
141 always the value (to - from). However, for shared mappings it is possible that
142 some reservations may already exist within the range (to - from). See the
143 section :ref:`Reservation Map Modifications <resv_map_modifications>`
151 After consulting the reservation map and subpool, the number of needed new
160 if (resv_needed <= (resv_huge_pages - free_huge_pages))
167 was adjusted, then the reservation map associated with the mapping is
169 file_region will exist that includes the range 'from' - 'to'. For private
170 mappings, no modifications are made to the reservation map as lack of an
174 reservation map associated with the mapping will be modified as required to
175 ensure reservations exist for the range 'from' - 'to'.
190 consult the reservation map to determine if a reservation exists. In addition,
199 :ref:`Reservation Map Helper Routines <resv_map_helpers>` for detailed
202 0 or 1. 0 if a reservation exists for the address, 1 if no reservation exists.
211 - avoid_reserve, this is the same value/argument passed to alloc_huge_page()
212 - chg, even though this argument is of type long only the values 0 or 1 are
227 resv_huge_pages--; /* Decrement the global reservation count */
229 Note, if no huge page can be found that satisfies the VMA's memory policy
234 resv_huge_pages--.
236 After obtaining a new huge page, (page)->private is set to the value of
241 map based on the consumption of the reservation. In general, this involves
243 map. For shared mappings where the reservation was present, an entry
244 in the reserve map already existed so no change is made. However, if there
245 was no reservation in a shared mapping or this was a private mapping a new
248 It is possible that the reserve map could have been changed between the call
257 :ref:`Reservation Map Helper Routines <resv_map_helpers>` for more
268 when a huge page that has been instantiated is freed no adjustment is made
282 The page->private field points to any subpool associated with the page.
345 COW, it is possible that no free huge pages are free and the allocation
350 map of the owner. Since the owner created the mapping, the owner owns all
352 occurs and there is no page available, different action is taken for the owner
353 and non-owner of the reservation.
360 non-owning task. In this way, the only reference is from the owning task.
361 In addition, the HPAGE_RESV_UNMAPPED bit is set in the reservation map pointer
362 of the non-owning task. The non-owning task may receive a SIGBUS if it later
363 faults on a non-present page. But, the original owner of the
369 Reservation Map Modifications
373 reservation map. Typically, these routines are not called directly. Rather,
374 a reservation map helper routine is called which calls one of these low level
383 Operations on the reservation map typically involve two operations:
385 1) region_chg() is called to examine the reserve map and determine how
393 the reservation map for the same range [f, t) previously passed to
400 range. region_chg() is responsible for pre-allocating any data structures
405 which are NOT currently represented in the map. This number is returned to
407 the map. In most cases, the return value of region_add() is the same as the
409 possible for changes to the reservation map to be made between the calls to
416 The routine region_del() is called to remove regions from a reservation map.
419 - When a file in the hugetlbfs filesystem is being removed, the inode will
420 be released and the reservation map freed. Before freeing the reservation
421 map, all the individual file_region structures must be freed. In this case
423 - When a hugetlbfs file is being truncated. In this case, all allocated pages
425 in the reservation map past the new end of file must be deleted. In this
427 - When a hole is being punched in a hugetlbfs file. In this case, huge pages
430 reservation map. In this case, region_del is passed the range
434 reservation map. In VERY rare cases, region_del() can fail. This can only
437 will return -ENOMEM. The problem here is that the reservation map will
441 counters so that they correspond with the reservation map entry that could
445 private mappings, the lack of a entry in the reservation map indicates that
447 reservation map we know how many reservations were consumed and how many are
448 outstanding (outstanding = (end - start) - region_count(resv, start, end)).
454 Reservation Map Helper Routines
461 or shared) and the location of the reservation map (inode or VMA) can be
463 in the section "Reservation Map Modifications". However, they do take into
464 account the 'opposite' meaning of reservation map entries for private and
471 This routine calls region_chg() for the specified page. If no reservation
484 map was modified between calls::
502 to add a reservation to the reservation map. It takes into account the
503 different reservation map semantics for private and shared mappings. Hence,
504 region_add is called for shared mappings (as an entry present in the map
506 the absence of an entry in the map indicates a reservation). See the section
515 :ref:`Reservation Map Helper Routines <resv_map_helpers>`, reservation
516 map modifications are performed in two steps. First vma_needs_reservation
528 reservation map and global count adjustments. If the page is freed at this
530 will increment the global reservation count. However, the reservation map
533 be higher than it should and prevent allocation of a pre-allocated page.
537 the reservation map to the way it was before the page allocation. In this
538 way, the state of the reservation map will correspond to the global reservation
542 attempting to restore the reservation map entry. In this case, it will
545 reservation map will continue to look as though the reservation was consumed.
556 Per-node huge page lists existed in struct hstate when git was first used
558 When reservations were added, no attempt was made to take memory policy
583 of cpusets or memory policy there is no guarantee that huge pages will be
595 --