[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02f682e2-0e9b-76a8-04fa-487891e18bdf@suse.cz>
Date: Fri, 27 Nov 2020 18:52:55 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>,
Georgi Djakov <georgi.djakov@...aro.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
sudaraja@...eaurora.org, pratikp@...eaurora.org,
lmark@...eaurora.org
Subject: Re: [PATCH] mm/page_owner: Record timestamp and pid
On 11/12/20 8:14 PM, Andrew Morton wrote:
> On Thu, 12 Nov 2020 20:41:06 +0200 Georgi Djakov <georgi.djakov@...aro.org> wrote:
>
>> From: Liam Mark <lmark@...eaurora.org>
>>
>> Collect the time for each allocation recorded in page owner so that
>> allocation "surges" can be measured.
>>
>> Record the pid for each allocation recorded in page owner so that
>> the source of allocation "surges" can be better identified.
>
> Please provide a description of why this is considered useful. What
> has it been used for, what problems has it been used to solve?
Worth noting that on x86_64 it doubles the size of struct page_owner
from 16 bytes to 32, so it better be justified:
struct page_owner {
short unsigned int order; /* 0 2 */
short int last_migrate_reason; /* 2 2 */
gfp_t gfp_mask; /* 4 4 */
depot_stack_handle_t handle; /* 8 4 */
depot_stack_handle_t free_handle; /* 12 4 */
u64 ts_nsec; /* 16 8 */
int pid; /* 24 4 */
/* size: 32, cachelines: 1, members: 7 */
/* padding: 4 */
/* last cacheline: 32 bytes */
};
> Are there userspace tools which aid in the processing of this new
> information?
>
> Can/should Documentation/vm/page_owner.rst be updated?
>
>> --- a/mm/page_owner.c
>> +++ b/mm/page_owner.c
>> @@ -10,6 +10,7 @@
>> #include <linux/migrate.h>
>> #include <linux/stackdepot.h>
>> #include <linux/seq_file.h>
>> +#include <linux/sched/clock.h>
>>
>> #include "internal.h"
>>
>> @@ -25,6 +26,8 @@ struct page_owner {
>> gfp_t gfp_mask;
>> depot_stack_handle_t handle;
>> depot_stack_handle_t free_handle;
>> + u64 ts_nsec;
>> + int pid;
>
> pid_t would be nicer?
>
>
>
Powered by blists - more mailing lists