t;_mapcount) + 1;
> + int mapcount = atomic_read(&page->_mapcount);
>
> /* Handle page_has_type() pages */
> - if (mapcount < 0)
> - mapcount = 0;
> + mapcount = page_type_has_type(mapcount) ? 0 : mapcount + 1;
> if (unlikely(PageComp
On 9 Apr 2024, at 15:22, 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
On 24 Jul 2024, at 18:44, Zi Yan wrote:
> On 23 Jul 2024, at 2:41, Mike Rapoport wrote:
>
>> From: "Mike Rapoport (Microsoft)"
>>
>> Hi,
>>
>> Following the discussion about handling of CXL fixed memory windows on
>> arm64 [1] I decided to bite
On 24 Jul 2024, at 20:35, Zi Yan wrote:
> On 24 Jul 2024, at 18:44, Zi Yan wrote:
>
>> On 23 Jul 2024, at 2:41, Mike Rapoport wrote:
>>
>>> From: "Mike Rapoport (Microsoft)"
>>>
>>> Hi,
>>>
>>> Following the discussion abou
ize (must be a power of 2 of PAGE_SIZE and
> supported anonymous THP) and is one of ``always``, ``madvise``,
> -``never`` or ``inherit``.
> +``defer``, ``never`` or ``inherit``.
>
> For example, the following will set 16K, 32K, 64K THP to ``always``,
> set 128K, 512K to ``inherit``, set 256K to ``madvise`` and 1M, 2M
Otherwise, LGTM. Thanks. Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
led early. */
> if ((tva_flags & TVA_ENFORCE_SYSFS) && vma_is_anonymous(vma)) {
And code here becomes tva_flags & (TVA_ENFORCE_SYSFS | TVA_IN_KHUGEPAGE).
Otherwise, LGTM. Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
changed, 2 insertions(+)
>
Acked-by: Zi Yan
--
Best Regards,
Yan, Zi
A_IN_PF) && hugepage_global_defer() &&
> + !(vm_flags & VM_HUGEPAGE))
> + return 0;
> +
> /* Optimization to check if required orders are enabled early. */
> if ((tva_flags & TVA_ENFORCE_SYSFS) && vma_is_anonymous(vma)) {
> unsigned long mask = READ_ONCE(huge_anon_orders_always);
> -
This newline should stay, right?
The rest looks good to me. Thanks. Acked-by: Zi Yan
Best Regards,
Yan, Zi
loc.c | 5 -
> 2 files changed, 10 deletions(-)
>
Acked-by: Zi Yan
Best Regards,
Yan, Zi
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's allow for not clearing a page type before freeing a page to the
> buddy.
>
> We'll focus on having a type set on the first page of a larger
> allocation only.
>
> With this change, we can reliably identify typed folios even though
> they m
On 18 Jun 2025, at 14:39, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>
>>> ... and start moving back to per-page things that will absolutely not be
>>> folio things in th
On 18 Jun 2025, at 15:18, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>> + /*
>>> +* TODO: these pages will not be folios in the future. All
>>> +* folio
ageOffline is sticky until the page is freed to the buddy. */
> }
>
> /*
> --
> 2.49.0
Acked-by: Zi Yan
Best Regards,
Yan, Zi
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's allow for not clearing a page type before freeing a page to the
> buddy.
>
> We'll focus on having a type set on the first page of a larger
> allocation only.
>
> With this change, we can reliably identify typed folios even though
> they m
On 18 Jun 2025, at 14:04, Zi Yan wrote:
> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>
>> Let's allow for not clearing a page type before freeing a page to the
>> buddy.
>>
>> We'll focus on having a type set on the first page of a larger
>> a
s drop this unnecessary check.
>
> Signed-off-by: David Hildenbrand
> ---
> mm/balloon_compaction.c | 6 --
> 1 file changed, 6 deletions(-)
>
Acked-by: Zi Yan
Best Regards,
Yan, Zi
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let the buddy handle clearing the type.
Same comment as Patch 5.
>
> Signed-off-by: David Hildenbrand
> ---
> mm/zpdesc.h | 5 -
> mm/zsmalloc.c | 3 +--
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
On 18 Jun 2025, at 14:06, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 02:04:18PM -0400, Zi Yan wrote:
>>> Let's allow for not clearing a page type before freeing a page to the
>>> buddy.
>>>
>>> We'll focus on having a type set on the first p
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> ... and start moving back to per-page things that will absolutely not be
> folio things in the future. Add documentation and a comment that the
> remaining folio stuff (lock, refcount) will have to be reworked as well.
>
> While at it, convert t
lio);
> - folio_put(folio);
> + putback_movable_ops_page(&folio->page);
> } else {
> node_stat_mod_folio(folio, NR_ISOLATED_ANON +
> folio_is_file_lru(folio),
> -folio_nr_pages(folio));
> --
> 2.49.0
Acked-by: Zi Yan
Best Regards,
Yan, Zi
file changed, 14 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
> deals with actual folios. (we only support migration of
> individual movable_ops pages)
>
> Signed-off-by: David Hildenbrand
> ---
> mm/migrate.c | 61
> 1 file changed, 28 insertions(+), 33 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
ed-off-by: David Hildenbrand
> ---
> mm/migrate.c | 82
> 1 file changed, 45 insertions(+), 37 deletions(-)
>
LGTM. Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
the driver should call
__ClearPageMovable(@src) and return MIGRATEPAGE_SUCCESS.
"
Otherwise, Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
| 18 ++
> 3 files changed, 10 insertions(+), 25 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
On 18 Jun 2025, at 13:40, David Hildenbrand wrote:
> Currently, we only support migration of individual non-folio pages, so
> we can not run into that.
>
> Signed-off-by: David Hildenbrand
> ---
> mm/page_isolation.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's make it clearer that we are talking about movable_ops pages.
>
> Signed-off-by: David Hildenbrand
> ---
> include/linux/migrate.h| 2 +-
> include/linux/page-flags.h | 2 +-
> mm/compaction.c| 7 ++-
> mm/memory-fa
f-by: David Hildenbrand
> ---
> include/linux/page-flags.h | 6 --
> mm/migrate.c | 43 --
> mm/vmscan.c| 6 --
> 3 files changed, 17 insertions(+), 38 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
c.c | 8 +++-
> 8 files changed, 35 insertions(+), 25 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
age-flags.h | 5 -
> mm/page_alloc.c| 7 +++
> 2 files changed, 3 insertions(+), 9 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
> mm/util.c | 6 +++---
> 10 files changed, 30 insertions(+), 31 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
t's simply refuse typed pages (which includes slab) except hugetlb,
> and WARN.
>
> Signed-off-by: David Hildenbrand
> ---
> include/linux/mm.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
1 file changed, 6 insertions(+), 6 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
On 18 Jun 2025, at 13:40, David Hildenbrand wrote:
> It's unused and the page counterpart is gone, so let's remove it.
>
> Signed-off-by: David Hildenbrand
> ---
> include/linux/page-flags.h | 5 -
> 1 file changed, 5 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
not reusing the PG_movable_ops and PG_movable_ops_isolated page flags
> +for other purposes
> +
> +For example, balloon drivers can make use of this framework through the
> +balloon-compaction framework residing in the core kernel.
>
> Monitoring Migration
> =
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
pdesc(unsigned long pfn)
>
> static inline void __zpdesc_set_movable(struct zpdesc *zpdesc)
> {
> - __SetPageMovable(zpdesc_page(zpdesc));
> + SetPageMovableOps(zpdesc_page(zpdesc));
> }
>
> static inline void __zpdesc_set_zsmalloc(struct zpdesc *zpdesc)
> --
> 2.49.0
Otherwise, LGTM. Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
h | 16 +++-
> mm/compaction.c| 2 +-
> mm/migrate.c | 14 +++---
> 3 files changed, 19 insertions(+), 13 deletions(-)
>
Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
On 23 Jun 2025, at 11:26, David Hildenbrand wrote:
> On 18.06.25 20:08, Zi Yan wrote:
>> On 18 Jun 2025, at 14:04, Zi Yan wrote:
>>
>>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>>
>>>> Let's allow for not clearing a page type before
On 23 Jun 2025, at 11:33, David Hildenbrand wrote:
> On 18.06.25 20:48, Zi Yan wrote:
>> On 18 Jun 2025, at 14:39, Matthew Wilcox wrote:
>>
>>> On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote:
>>>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>
On 23 Jun 2025, at 11:28, David Hildenbrand wrote:
> On 18.06.25 20:50, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>
>>> Let the buddy handle clearing the type.
>>
>> The below might be more precise? Since page type is cleared
&
On 23 Jun 2025, at 11:47, David Hildenbrand wrote:
> On 20.06.25 22:37, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>
>>> Let's make it clearer that we are talking about movable_ops pages.
>>>
>>> Signed-off-by: David Hil
On 30 Jun 2025, at 12:01, Lorenzo Stoakes wrote:
> On Mon, Jun 30, 2025 at 02:59:46PM +0200, David Hildenbrand wrote:
>> Let the page freeing code handle clearing the page type.
>
> Why is this advantageous? We want to keep the page marked offline for longer?
>
>>
>>
brand
> ---
> mm/migrate.c | 37 -
> 1 file changed, 24 insertions(+), 13 deletions(-)
>
Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
43 matches
Mail list logo