From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98AB5C5519F for ; Fri, 27 Nov 2020 17:52:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 538212224A for ; Fri, 27 Nov 2020 17:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731915AbgK0Rw5 (ORCPT ); Fri, 27 Nov 2020 12:52:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:43062 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730603AbgK0Rw5 (ORCPT ); Fri, 27 Nov 2020 12:52:57 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 97D16AC0C; Fri, 27 Nov 2020 17:52:55 +0000 (UTC) Subject: Re: [PATCH] mm/page_owner: Record timestamp and pid To: Andrew Morton , Georgi Djakov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, sudaraja@codeaurora.org, pratikp@codeaurora.org, lmark@codeaurora.org References: <20201112184106.733-1-georgi.djakov@linaro.org> <20201112111436.c5deeadd3578877fc0b844a1@linux-foundation.org> From: Vlastimil Babka Message-ID: <02f682e2-0e9b-76a8-04fa-487891e18bdf@suse.cz> Date: Fri, 27 Nov 2020 18:52:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201112111436.c5deeadd3578877fc0b844a1@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/20 8:14 PM, Andrew Morton wrote: > On Thu, 12 Nov 2020 20:41:06 +0200 Georgi Djakov wrote: > >> From: Liam Mark >> >> 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 >> #include >> #include >> +#include >> >> #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? > > >