Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3528497ybb; Mon, 23 Mar 2020 02:50:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuVgg3MkGinEi9OOBiPbCfP9dHcj2pMHywVXjYpYz212NvXfyvOPwP9LQtgdn8v+cLT3jse X-Received: by 2002:aca:2b04:: with SMTP id i4mr16625071oik.61.1584957018549; Mon, 23 Mar 2020 02:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584957018; cv=none; d=google.com; s=arc-20160816; b=slWjkl+bkupL443sWOwcn1nqjzp/i6axOEGcfqeTt/Q2IX0pZhF262yW0I1JtlTWCH uJfesQXFWS8EUg3Vr1s1cqlwmZiMwy3bADQGjegLLuHKnKSojDc6wTmdiilFQWMBFlYo RS22xGzV/nmU52LoTBCBhEaWLqJDdjkPDfh3KSCiB2z/ksQsMZmwzTGoC0UWvMeLlD82 OwoziH5EQWjxIVqHfm7riVK01TqlXVYw0s9/qwl5mKAIIgnAgfhI4mO/wP1Q9EqCauW2 I96rz6LOMixF3JVt7rzzUIJs0bD0Nf0VnE+QoH7K4gSicD3UPA18ZYdvjNkRcsp/nUYW dkuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=86VnTXNJ//yYY/UNimBaJEnwlPkxogwsGMJTQrJkBKQ=; b=VtvokxVcOXsxUHSh8PbVYGjuc38QjP7Y/i24AovgxkZ8JitS36l9ShpVFn77ETXks9 l0KNLAiFRux9KTfvEXcSPLCk55KN1E2RMVf3V1SS3ySwYEd7P34gC0SSf6BKU9ZdVftT u05o3aSym6oSNOVtNGtn0z+oMiuJ9pexzpozBPiWIychKXTl9IVc3RiA35p0i14wUf4l p+TfsDdCELmkQ8WgX6hQjyLBkko2L8ovJZEgFYr9cVrlIXlEDpyTcvH0NiKt7nPRK7q5 NEa/FxGwS3sJ8F97yr3CpFlwAzF6tX5vg8YzWa7wd+b24TGSHrfcMePDvhQI8f3gn9Mw ztgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LSULd/9g"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v15si7921051oth.307.2020.03.23.02.50.05; Mon, 23 Mar 2020 02:50:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LSULd/9g"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727761AbgCWJtt (ORCPT + 99 others); Mon, 23 Mar 2020 05:49:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:54728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727737AbgCWJtt (ORCPT ); Mon, 23 Mar 2020 05:49:49 -0400 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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