Revert "mm/page_owner: fix page owner count"

* Reason: Conflicts with upstream changes.

This reverts commit 483f69fa3b.
This commit is contained in:
bengris32
2023-08-15 16:59:43 +01:00
parent a368d95f5d
commit 5e5da950a5
3 changed files with 4 additions and 6 deletions

View File

@@ -29,8 +29,7 @@ depot_stack_handle_t depot_save_stack(struct stack_trace *trace, gfp_t flags);
void depot_fetch_stack(depot_stack_handle_t handle, struct stack_trace *trace);
#ifdef CONFIG_PAGE_OWNER
void depot_hit_stack(depot_stack_handle_t handle, struct stack_trace *trace,
int cnt);
void depot_hit_stack(depot_stack_handle_t handle, struct stack_trace *trace);
void show_max_hit_page(void);
#endif

View File

@@ -223,8 +223,7 @@ void depot_fetch_stack(depot_stack_handle_t handle, struct stack_trace *trace)
EXPORT_SYMBOL_GPL(depot_fetch_stack);
#ifdef CONFIG_PAGE_OWNER
void depot_hit_stack(depot_stack_handle_t handle, struct stack_trace *trace,
int cnt)
void depot_hit_stack(depot_stack_handle_t handle, struct stack_trace *trace)
{
union handle_parts parts = { .handle = handle };
void *slab = stack_slabs[parts.slabindex];
@@ -232,7 +231,7 @@ void depot_hit_stack(depot_stack_handle_t handle, struct stack_trace *trace,
struct stack_record *stack = slab + offset;
unsigned long flags;
stack->hit += cnt;
stack->hit++;
spin_lock_irqsave(&max_found_lock, flags);
if ((!max_found) || (stack->hit > max_found->hit))
max_found = stack;

View File

@@ -653,7 +653,7 @@ static ssize_t __update_max_page_owner(unsigned long pfn,
.skip = 0
};
depot_hit_stack(handle, &trace, (1 << page_owner->order));
depot_hit_stack(handle, &trace);
return 0;
}