Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1411617pxf; Fri, 19 Mar 2021 06:47:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUbpNmBn4RgPb2TRHC1QkMPS7fG4Iuqdf521LE09papCJfXeGvEqRgTiJlAAFyXcYr4hbf X-Received: by 2002:a17:907:3d01:: with SMTP id gm1mr4526499ejc.214.1616161641018; Fri, 19 Mar 2021 06:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616161641; cv=none; d=google.com; s=arc-20160816; b=dO2xsoyHjo6FR3eBCksrZOcn3JLMgcB6FgO/gI4B99LqT597e5keOVWfk6pb17WU2s w3YrVhyBzwtM2QtmJ2/pUsFfEq7VBFFhjtjSuLNwOfGX3jamOueTNztEjlLhFzSkglvz MZEQJ/JxVpL28Oa6Ds8BlE3xEGx+7ixGYr7gKK98Wu5yYMLH8pH3pWHxFGkjqPRiZFpx W9ehFp8WkCkWcPqiyNU+pt+LQT0U7bEbMtxky/YZNVztnhfiHp8uO0Xibs5ClRyZK4Qg nqfXrX1FPfhxME6rvKpF5TrHFMyJmI/JCcpV4PaHpI7+BHpu9Gnz2O8MfmKirbFkWg8a NXfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gSrBNdQqIWnx0ZljjNOoO72ifoxqW6PSaqqx7JS1SXc=; b=TAr8Q6Y7w95tSjfARHGSlQavZHK0s82N9UfIpNWusDOOwPWOtLX09mHq/zDixzJzC5 5PGU6X2K0Lcda3k45t30fs6YO43ux/xMI34mGOUCqRPmHNWh7ehIWKC8IrxpBR8ke/TI eXkJLCIT52vTGr9AjH7dpm8KG2c5WSfwFzzw+1om4vqGvRfToRvTFJC69ajWn5bj9Nvs U29ig9VuCxUlPocRIywHzX2yBr6zkFJXrbIe5m4tsvDlziYNsawVk0tsSmeVWXf2u/PT aAHE9uMxRcJJseGd67rlxTJ2JYf7jq3KRbZ0eEY4uhd5PKrFEJZtzdSsqQTTMohpvTIV eWhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hSI/v73k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si4311820ejv.550.2021.03.19.06.46.58; Fri, 19 Mar 2021 06:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hSI/v73k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbhCSNnH (ORCPT + 99 others); Fri, 19 Mar 2021 09:43:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:51238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbhCSNnA (ORCPT ); Fri, 19 Mar 2021 09:43:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 812E864F04; Fri, 19 Mar 2021 13:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616161380; bh=7mQCTG/AIZnXq4/oljSjBp3t2b8XcL14K/DhpsnZ5WY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hSI/v73kwjbmtzZbm0OIzh40eyB+o05loZRX372Uaji6cwRlyjMJLn72rtxgbJBxq eUefiXvrpnG1YIBMaXFd8jjR7gM64/lfJwU44yFXTc6ZJzcNMGyvOKMJQVFnCI4HBg WURVRSTINeA5Jzt1iOmKl6eB8ZQncs1OW1uxXcMc= Date: Fri, 19 Mar 2021 14:42:57 +0100 From: Greg Kroah-Hartman To: Dmitry Osipenko Cc: Minchan Kim , Andrew Morton , linux-mm , LKML , joaodias@google.com, willy@infradead.org, david@redhat.com, surenb@google.com, John Hubbard , Nicolas Chauvet , "linux-tegra@vger.kernel.org" Subject: Re: [PATCH v4] mm: cma: support sysfs Message-ID: References: <20210309062333.3216138-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 04:39:41PM +0300, Dmitry Osipenko wrote: > 19.03.2021 15:44, Dmitry Osipenko пишет: > ... > >> #include > >> +#include > >> + > >> +struct cma_stat { > >> + spinlock_t lock; > >> + /* the number of CMA page successful allocations */ > >> + unsigned long nr_pages_succeeded; > >> + /* the number of CMA page allocation failures */ > >> + unsigned long nr_pages_failed; > >> + struct kobject kobj; > >> +}; > >> > >> struct cma { > >> unsigned long base_pfn; > >> @@ -16,6 +26,9 @@ struct cma { > >> struct debugfs_u32_array dfs_bitmap; > >> #endif > >> char name[CMA_MAX_NAME]; > >> +#ifdef CONFIG_CMA_SYSFS > >> + struct cma_stat *stat; > >> +#endif > > What is the point of allocating stat dynamically? Because static kobjects make me cry.