On 14.04.24 19:08, Alex Elder wrote:
Several times recently Greg KH has admonished that variants of WARN()
should not be used, because when the panic_on_warn kernel option is set,
their use can lead to a panic. His reasoning was that the majority of
Linux instances (including Android and cloud sy
On 19.04.24 04:25, Yin, Fengwei wrote:
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
As we grow the code, the compiler might make stupid decisions and
unnecessarily degrade fork() performance. Let's make sure to always inline
functions that operate on a single PTE so the compiler will always
On 19.04.24 04:29, Yin, Fengwei wrote:
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
@@ -2200,7 +2200,22 @@ static inline size_t folio_size(struct folio *folio)
*/
static inline bool folio_likely_mapped_shared(struct folio *folio)
{
- return page_mapcount(folio_page(folio, 0))
On 4/19/2024 5:19 PM, David Hildenbrand wrote:
On 19.04.24 04:29, Yin, Fengwei wrote:
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
@@ -2200,7 +2200,22 @@ static inline size_t folio_size(struct folio
*folio)
*/
static inline bool folio_likely_mapped_shared(struct folio *folio)
On 19.04.24 15:47, Yin, Fengwei wrote:
On 4/19/2024 5:19 PM, David Hildenbrand wrote:
On 19.04.24 04:29, Yin, Fengwei wrote:
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
@@ -2200,7 +2200,22 @@ static inline size_t folio_size(struct folio
*folio)
*/
static inline bool folio_likel
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
As we grow the code, the compiler might make stupid decisions and
unnecessarily degrade fork() performance. Let's make sure to always inline
functions that operate on a single PTE so the compiler will always
optimize out the loop and avoid a funct
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
Let's track the mapcount of large folios in a single value. The mapcount of
a large folio currently corresponds to the sum of the entire mapcount and
all page mapcounts.
This sum is what we actually want to know in folio_mapcount() and it is
also
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
We can now read the mapcount of large folios very efficiently. Use it to
improve our handling of partially-mappable folios, falling back
to making a guess only in case the folio is not "obviously mapped shared".
We can now better detect partially
On 4/10/2024 3:22 AM, David Hildenbrand wrote:
Let's add a fast-path for small folios to all relevant rmap functions.
Note that only RMAP_LEVEL_PTE applies.
This is a preparation for tracking the mapcount of large folios in a
single value.
Signed-off-by: David Hildenbrand
Reviewed-by: Yin