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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 95F4CC54FCF for ; Mon, 23 Mar 2020 09:49:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3ED782074D for ; Mon, 23 Mar 2020 09:49:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="LSULd/9g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ED782074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C04CC6B0005; Mon, 23 Mar 2020 05:49:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB57B6B0006; Mon, 23 Mar 2020 05:49:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACA576B0007; Mon, 23 Mar 2020 05:49:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 95C656B0005 for ; Mon, 23 Mar 2020 05:49:50 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9198C180AD811 for ; Mon, 23 Mar 2020 09:49:50 +0000 (UTC) X-FDA: 76626155340.18.grain96_901ab9f206963 X-HE-Tag: grain96_901ab9f206963 X-Filterd-Recvd-Size: 3309 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Mar 2020 09:49:50 +0000 (UTC) Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B5022072D; Mon, 23 Mar 2020 09:49:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584956988; bh=Dk9SiQHTvQDbS1aDBmct0UumdwanFiG0VwvW4geFoX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LSULd/9gOiraf5VSWDJaltlND3dLyq3/XYW5kRo1UHq7nV7tV0kIgncKq3yFgmPbq QOrPv+GZWXZq5oFHq2ycSIzwD38EuTM9L/n9Y1Ge+z833ItBbLH/ifI8YStGlieQTE E/rDy5i7fGDZMudd5gobmLJdX7pLFD+pG1mmmKmw= Date: Mon, 23 Mar 2020 10:49:46 +0100 From: Greg KH To: Jaewon Kim Cc: leon@kernel.org, vbabka@suse.cz, adobriyan@gmail.com, akpm@linux-foundation.org, labbott@redhat.com, sumit.semwal@linaro.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, kasong@redhat.com, bhe@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com, linux-api@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [RFC PATCH v2 3/3] android: ion: include system heap size in meminfo extra Message-ID: <20200323094946.GA425358@kroah.com> References: <20200323080503.6224-1-jaewon31.kim@samsung.com> <20200323080503.6224-4-jaewon31.kim@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200323080503.6224-4-jaewon31.kim@samsung.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 23, 2020 at 05:05:03PM +0900, Jaewon Kim wrote: > In Android system ion system heap size is huge like hundreds of MB. To > know overal system memory usage, include ion system heap size in > proc/meminfo_extra. > > To include heap size, use register_meminfo_extra introduced in previous > patch. > > Prior to register we need to add stats to show the ion heap usage. Add > total_allocated into ion heap and count it on allocation and freeing. In > a ion heap using ION_HEAP_FLAG_DEFER_FREE, a buffer can be freed from > user but still live on deferred free list. Keep stats until the buffer > is finally freed so that we can cover situation of deferred free thread > stuck problem. > > i.e) cat /proc/meminfo_extra | grep IonSystemHeap > IonSystemHeap: 242620 kB > > i.e.) show_mem on oom > <6>[ 420.856428] Mem-Info: > <6>[ 420.856433] IonSystemHeap:32813kB > > Signed-off-by: Jaewon Kim > --- > drivers/staging/android/ion/ion.c | 2 ++ > drivers/staging/android/ion/ion.h | 1 + > drivers/staging/android/ion/ion_system_heap.c | 2 ++ > 3 files changed, 5 insertions(+) Does this really give the proper granularity that ion users have? I thought they wanted to know what each heap was doing. Also, this code should be deleted really soon now, so I would not make any core changes to the kernel based on it at all. thanks, greg k-h