Lines Matching refs:reservation
65 These are stored in the bottom bits of the reservation map pointer.
76 reservation must be restored when the huge page is freed. More
86 semantics of the reservation map is significantly different for the two types
89 - For private mappings, the reservation map hangs off the VMA structure.
92 - For shared mappings, the reservation map hangs off the inode. Specifically,
95 contains a reservation map. As a result, the reservation map is allocated
122 in which reservations are represented in the reservation map.
124 - For shared mappings, an entry in the reservation map indicates a reservation
126 consumed, the reservation map is not modified.
127 - For private mappings, the lack of an entry in the reservation map indicates
128 a reservation exists for the corresponding page. As reservations are
129 consumed, entries are added to the reservation map. Therefore, the
130 reservation map can also be used to determine which reservations have
133 For private mappings, hugetlb_reserve_pages() creates the reservation map and
137 The reservation map is consulted to determine how many huge page reservations
149 After consulting the reservation map and subpool, the number of needed new
154 are enough free huge pages to accommodate the reservation. If there are,
155 the global reservation count resv_huge_pages is adjusted something like the
165 was adjusted, then the reservation map associated with the mapping is
168 mappings, no modifications are made to the reservation map as lack of an
169 entry indicates a reservation exists.
171 If hugetlb_reserve_pages() was successful, the global reservation count and
172 reservation map associated with the mapping will be modified as required to
188 consult the reservation map to determine if a reservation exists. In addition,
196 reservation exists for the address within the mapping(vma). See the section
200 0 or 1. 0 if a reservation exists for the address, 1 if no reservation exists.
201 If a reservation does not exist, and there is a subpool associated with the
205 a reservation for the allocation. After determining whether a reservation
213 reservation exists (see the section "Memory Policy and Reservations" for
214 possible issues). If the value is 1, it indicates a reservation does not
219 when the page is removed from the free list. If there was a reservation
223 * a reservation, and if an error is
225 * freed, the reservation will be restored. */
226 resv_huge_pages--; /* Decrement the global reservation count */
232 reservation based adjustments as above will be made: SetPagePrivate(page) and
240 map based on the consumption of the reservation. In general, this involves
242 map. For shared mappings where the reservation was present, an entry
244 was no reservation in a shared mapping or this was a private mapping a new
251 mapping. In such cases, the reservation count and subpool free page count
268 to the global reservation count (resv_huge_pages).
276 is freed, reservation accounting may need to be performed. This would
337 biggest reservation concern for COW is private mappings. In this case,
342 When the page was originally allocated, the reservation for that page was
348 was noted by setting the HPAGE_RESV_OWNER bit in the pointer to the reservation
352 and non-owner of the reservation.
358 original reservation. To accomplish this, the page is unmapped from the
360 In addition, the HPAGE_RESV_UNMAPPED bit is set in the reservation map pointer
363 mapping/reservation will behave as expected.
372 reservation map. Typically, these routines are not called directly. Rather,
373 a reservation map helper routine is called which calls one of these low level
382 Operations on the reservation map typically involve two operations:
392 the reservation map for the same range [f, t) previously passed to
408 possible for changes to the reservation map to be made between the calls to
415 The routine region_del() is called to remove regions from a reservation map.
419 be released and the reservation map freed. Before freeing the reservation
424 in the reservation map past the new end of file must be deleted. In this
429 reservation map. In this case, region_del is passed the range
433 reservation map. In VERY rare cases, region_del() can fail. This can only
436 will return -ENOMEM. The problem here is that the reservation map will
437 indicate that there is a reservation for the page. However, the subpool and
438 global reservation counts will not reflect the reservation. To handle this
440 counters so that they correspond with the reservation map entry that could
444 private mappings, the lack of a entry in the reservation map indicates that
445 a reservation exists. Therefore, by counting the number of entries in the
446 reservation map we know how many reservations were consumed and how many are
448 Since the mapping is going away, the subpool and global reservation counts
456 Several helper routines exist to query and modify the reservation maps.
460 or shared) and the location of the reservation map (inode or VMA) can be
463 account the 'opposite' meaning of reservation map entries for private and
470 This routine calls region_chg() for the specified page. If no reservation
471 exists, 1 is returned. If a reservation exists, 0 is returned::
479 vma_needs_reservation. It will add a reservation entry for the page. It
480 returns 1 if the reservation was added and 0 if not. The return value should
482 vma_needs_reservation. An unexpected difference indicates the reservation
491 vma_needs_reservation. It will abort/end the in progress reservation add
498 This is a special wrapper routine to help facilitate reservation cleanup
501 to add a reservation to the reservation map. It takes into account the
502 different reservation map semantics for private and shared mappings. Hence,
504 indicates a reservation), and region_del is called for private mappings (as
505 the absence of an entry in the map indicates a reservation). See the section
514 :ref:`Reservation Map Helper Routines <resv_map_helpers>`, reservation
518 Global and subpool reservation counts are adjusted based on success or failure
526 allocation has consumed the reservation and made the appropriate subpool,
527 reservation map and global count adjustments. If the page is freed at this
529 will increment the global reservation count. However, the reservation map
530 indicates the reservation was consumed. This resulting inconsistent state
536 the reservation map to the way it was before the page allocation. In this
537 way, the state of the reservation map will correspond to the global reservation
541 attempting to restore the reservation map entry. In this case, it will
544 reservation map will continue to look as though the reservation was consumed.
550 so that a reservation will not be leaked when the huge page is freed.
564 * reservation as the accounting is done on a global variable. Such
565 * reservation is completely rubbish in the presence of cpuset because
566 * the reservation is not checked against page availability for the