Lines Matching refs:reservation

67 	These are stored in the bottom bits of the reservation map pointer.
78 reservation must be restored when the huge page is freed. More
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.
94 - For shared mappings, the reservation map hangs off the inode. Specifically,
97 contains a reservation map. As a result, the reservation map is allocated
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
130 a reservation exists for the corresponding page. As reservations are
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
151 After consulting the reservation map and subpool, the number of needed new
156 are enough free huge pages to accommodate the reservation. If there are,
157 the global reservation count resv_huge_pages is adjusted something like the
167 was adjusted, then the reservation map associated with the mapping is
170 mappings, no modifications are made to the reservation map as lack of an
171 entry indicates a reservation exists.
173 If hugetlb_reserve_pages() was successful, the global reservation count and
174 reservation map associated with the mapping will be modified as required to
190 consult the reservation map to determine if a reservation exists. In addition,
198 reservation exists for the address within the mapping(vma). See the section
202 0 or 1. 0 if a reservation exists for the address, 1 if no reservation exists.
203 If a reservation does not exist, and there is a subpool associated with the
207 a reservation for the allocation. After determining whether a reservation
214 reservation exists (see the section "Memory Policy and Reservations" for
215 possible issues). If the value is 1, it indicates a reservation does not
220 when the page is removed from the free list. If there was a reservation
224 * a reservation, and if an error is
226 * freed, the reservation will be restored. */
227 resv_huge_pages--; /* Decrement the global reservation count */
233 reservation based adjustments as above will be made: SetPagePrivate(page) and
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
245 was no reservation in a shared mapping or this was a private mapping a new
252 mapping. In such cases, the reservation count and subpool free page count
269 to the global reservation count (resv_huge_pages).
277 passed a pointer to the page struct. When a huge page is freed, reservation
338 biggest reservation concern for COW is private mappings. In this case,
343 When the page was originally allocated, the reservation for that page was
349 was noted by setting the HPAGE_RESV_OWNER bit in the pointer to the reservation
353 and non-owner of the reservation.
359 original reservation. To accomplish this, the page is unmapped from the
361 In addition, the HPAGE_RESV_UNMAPPED bit is set in the reservation map pointer
364 mapping/reservation will behave as expected.
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:
393 the reservation map for the same range [f, t) previously passed to
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.
420 be released and the reservation map freed. Before freeing the reservation
425 in the reservation map past the new end of file must be deleted. In this
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
438 indicate that there is a reservation for the page. However, the subpool and
439 global reservation counts will not reflect the reservation. To handle this
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
446 a reservation exists. Therefore, by counting the number of entries in the
447 reservation map we know how many reservations were consumed and how many are
449 Since the mapping is going away, the subpool and global reservation counts
457 Several helper routines exist to query and modify the reservation maps.
461 or shared) and the location of the reservation map (inode or VMA) can be
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
472 exists, 1 is returned. If a reservation exists, 0 is returned::
480 vma_needs_reservation. It will add a reservation entry for the page. It
481 returns 1 if the reservation was added and 0 if not. The return value should
483 vma_needs_reservation. An unexpected difference indicates the reservation
492 vma_needs_reservation. It will abort/end the in progress reservation add
499 This is a special wrapper routine to help facilitate reservation cleanup
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,
505 indicates a reservation), and region_del is called for private mappings (as
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
519 Global and subpool reservation counts are adjusted based on success or failure
527 allocation has consumed the reservation and made the appropriate subpool,
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
531 indicates the reservation was consumed. This resulting inconsistent state
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.
551 so that a reservation will not be leaked when the huge page is freed.
565 * reservation as the accounting is done on a global variable. Such
566 * reservation is completely rubbish in the presence of cpuset because
567 * the reservation is not checked against page availability for the