File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1544,9 +1544,16 @@ static inline bool is_longterm_pinnable_page(struct page *page)
1544
1544
if (mt == MIGRATE_CMA || mt == MIGRATE_ISOLATE )
1545
1545
return false;
1546
1546
#endif
1547
- return !(is_device_coherent_page (page ) ||
1548
- is_zone_movable_page (page ) ||
1549
- is_zero_pfn (page_to_pfn (page )));
1547
+ /* The zero page may always be pinned */
1548
+ if (is_zero_pfn (page_to_pfn (page )))
1549
+ return true;
1550
+
1551
+ /* Coherent device memory must always allow eviction. */
1552
+ if (is_device_coherent_page (page ))
1553
+ return false;
1554
+
1555
+ /* Otherwise, non-movable zone pages can be pinned. */
1556
+ return !is_zone_movable_page (page );
1550
1557
}
1551
1558
#else
1552
1559
static inline bool is_longterm_pinnable_page (struct page * page )
You can’t perform that action at this time.
0 commit comments