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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 8D651C3E8C5 for ; Fri, 27 Nov 2020 18:57:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8AC421D91 for ; Fri, 27 Nov 2020 18:57:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ih8vraZG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8AC421D91 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DEFD66B0036; Fri, 27 Nov 2020 13:57:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D9FD26B005C; Fri, 27 Nov 2020 13:57:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C67E46B0068; Fri, 27 Nov 2020 13:57:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id ADFFD6B0036 for ; Fri, 27 Nov 2020 13:57:44 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 74E2D3641 for ; Fri, 27 Nov 2020 18:57:44 +0000 (UTC) X-FDA: 77531107248.06.stop83_41014092738a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 54C6C10051D52 for ; Fri, 27 Nov 2020 18:57:44 +0000 (UTC) X-HE-Tag: stop83_41014092738a X-Filterd-Recvd-Size: 5574 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Nov 2020 18:57:43 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id 23so6592024wrc.8 for ; Fri, 27 Nov 2020 10:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:subject:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=/aqzWfKAyZcFADuzDmYKakUb1PJhvmbjruHjYS0Occc=; b=ih8vraZG1vXAUFx2hRFOZ5rIXLALstaSd60XXbEPnNEObAiJpUoNcFNLws29clecY/ 6L2SgdyOSVIRG5ZIn/nHDAwEjwn2xE37bkPDpzoCPwXj108q4OukQ4lwjpxDI0y9v+ao 1MJTLrDRE5zLzFRfPaPrt29PzXThuIAfFHfCywcCmPVg7IeFuu0XPIwArUXcHe5rk1NY mAYaW6ilg/ErRdbLbKvQuZOdrHeMUNfKh+q8NWwp71m3zyveas/5ijnzC3JI4lMgXz0J wkCl9r5027lWbRqKFQREty2dSE/SnHjy9kRbN/o9kqsW+5hOZ6uzAzHuTx6B8sLfUPh3 rqwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/aqzWfKAyZcFADuzDmYKakUb1PJhvmbjruHjYS0Occc=; b=qqJbNSZXiXwiqalckwTpYGeg1mVB3foeyDhemXnDnQigqUVCsHlZV7CahjWUPFVKn6 9gc4pQZH/Nu/MS9a0g9hAkkCnQsFKwdkAmELBY4MRBx6ktfrBfexDBnnBdrW42sfXkh1 JGsEuvzz3i76B5XdoGd33KqdgB8kaEVGHinGFtMcQTUnFmgm+tXPdOtP6QCVxHV/wF69 ueFpl+gZLqxTULtSlWUDCoOzKfZiPDIinSmIpRA1ZziBlQ5ngD8MXoI7ikNW2+10ZHzb CO80Y89PaiYozZ/wn2vo+R5KVfzT4fnkaTcV9evIpAUVN0yEWd/xIB5EJR6y0P9RDuaC S4zQ== X-Gm-Message-State: AOAM530XHGySaJi8jKLXwnpierZVwpJbOpm5E0XebCFRpJBieyksvIRn dWurteqmEdghkTkfOykepxA6vA== X-Google-Smtp-Source: ABdhPJx+duHZQPgeCnc5beDK7iVxL5nBamRt9QZ1E6W7obHe9ErS3aqVxolCuOOrGLrvs0CE36wddw== X-Received: by 2002:adf:a54d:: with SMTP id j13mr12679404wrb.132.1606503462658; Fri, 27 Nov 2020 10:57:42 -0800 (PST) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id h4sm15769103wrq.3.2020.11.27.10.57.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Nov 2020 10:57:41 -0800 (PST) To: Vlastimil Babka , Andrew Morton 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> <02f682e2-0e9b-76a8-04fa-487891e18bdf@suse.cz> From: Georgi Djakov Subject: Re: [PATCH] mm/page_owner: Record timestamp and pid Message-ID: <3ef3d770-d74b-5588-6672-f092c1526461@linaro.org> Date: Fri, 27 Nov 2020 20:57:43 +0200 MIME-Version: 1.0 In-Reply-To: <02f682e2-0e9b-76a8-04fa-487891e18bdf@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000062, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Vlastimil, Thanks for the comment! On 11/27/20 19:52, Vlastimil Babka wrote: > On 11/12/20 8:14 PM, Andrew Morton wrote: >> On Thu, 12 Nov 2020 20:41:06 +0200 Georgi Djakov =20 >> 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.=C2=A0 W= hat >> has it been used for, what problems has it been used to solve? >=20 > Worth noting that on x86_64 it doubles the size of struct page_owner > from 16 bytes to 32, so it better be justified: Well, that's true. But for debug options there is almost always some pena= lty. The timestamp and pid information is very useful for me (and others, i be= lieve) when doing memory analysis. On a crash for example, we can get this infor= mation from kdump (or RAM-dump) and look into it to catch memory allocation prob= lems more easily. If you find the above argument not strong enough, how about a separate co= nfig=20 option for this? Maybe something like CONFIG_PAGE_OWNER_EXTENDED, which c= ould be enabled in addition to CONFIG_PAGE_OWNER? Thanks, Georgi >=20 > struct page_owner { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 short unsigned int=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 order;=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /*=C2=A0=C2= =A0=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0 2 */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 short int=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2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