Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3044991pxb; Tue, 12 Jan 2021 05:08:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0RFn4wIzQ2RteKP3K0uEc2Jgn3DgTeGGvJif3eOeJLSrnuFtBIZH/g6Vrb3dSANieuV+1 X-Received: by 2002:a50:cd8c:: with SMTP id p12mr3326219edi.380.1610456932576; Tue, 12 Jan 2021 05:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456932; cv=none; d=google.com; s=arc-20160816; b=MfKLjoUeCVpOmhO8/f/ldM3Sn8XwgaoVawvQSq6/ohKVHtk77o8g7NFp2vJOjBmHL6 PRHC3XN0GiYPaQpiurqQC0yDic4ifoWwliSXAf4AxPMjqtKM5nhjEOz/KQ+bzvA7pDh7 SiUbVKSpDQuCaKUYIec8Zbie6ofNoqFUmv0YFs+tG5RgCzlssGEp3At05ARVJ03snN8i FgTFZ+9BAR1+8T4yliiOlThUyFJA3WAjcqhdVCHjN2yaIvL30MQdGZ87XrK3GoT6AhYZ Z+qNISB0TG19bgACtHVXMfeC0okTUdWYPXBFEZFs+OSQa/jkG6Lp+AngEHIF8DpgS+uT lO9A== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vY5CkWOSzrKwkx+Lg9L+kh7XLyKvhavbRykhww58a7I=; b=q12Jj6bmUWXMGmj0awb/8+3FzCBKhJFmUQGzpV/sxgSP8k7raU7zRDYqAWvQZsu63k 2UKWmQu1xCiMZ0AznmQFUFEenk12gPTphPDm95vWnf/5wz9bhNFbiKuGiUPevjCe6Ccm fN1pzTyzKQwXE4h1NO0ZwWWbBTWS8O031TNn853L/3cfqLwd5U4B/ZvyDKD/lqllmF6L RI9ABWGsGbcLO4s9ww/35eVkE+heCDjwpUNtzVziidLr5Uw79tdR4f5BhbVaxja4pkF0 nKrYXl383zRwIB/nj/s/4thhIuOc9f7MjR8dSBagvfgTExb622xLZ8HuYbv2pkuEEKT/ /xhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=g1fziY21; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz27si1200868edb.371.2021.01.12.05.08.27; Tue, 12 Jan 2021 05:08:52 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=g1fziY21; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387554AbhALMYL (ORCPT + 99 others); Tue, 12 Jan 2021 07:24:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387473AbhALMYJ (ORCPT ); Tue, 12 Jan 2021 07:24:09 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53013C061794 for ; Tue, 12 Jan 2021 04:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vY5CkWOSzrKwkx+Lg9L+kh7XLyKvhavbRykhww58a7I=; b=g1fziY21uYil16P0MjK0GhYWKp t2yCVvSMuSXtQTeYKf3hf1t321JHSA9w4ZRFWQlnlw47zSygIwJmwaOan335OX0GdZ0h4/cEZMQKD H70WWpKiTCvtIfupgokFAIuaR11XtF+ClGLCY1+fMP4Vo1XUYK0+F/DHO0U2YKAR6RblXLgQPWG4Y RwK4/EKWah80g7dvX+iKLe9NscDOQif6JRb1zj+1842pqxUI1mTQ+/XKj79MnWWuB/HWTBg50dGgw Id8eC9Q2oFVxFit1PxUd58OI01TqoRBTZmOWXon14872ryjfO8GEF7oRXE94rhPAi8qe0VLpFE5Ea GOQCzu8A==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1kzIhB-004l6r-Ce; Tue, 12 Jan 2021 12:22:55 +0000 Date: Tue, 12 Jan 2021 12:22:45 +0000 From: Matthew Wilcox To: Faiyaz Mohammed Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, vinmenon@codeaurora.org Subject: Re: [PATCH] mm: slub: Convert sys slab alloc_calls, free_calls to bin attribute Message-ID: <20210112122245.GK35215@casper.infradead.org> References: <1610443287-23933-1-git-send-email-faiyazm@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1610443287-23933-1-git-send-email-faiyazm@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 02:51:27PM +0530, Faiyaz Mohammed wrote: > @@ -5180,6 +5187,7 @@ static int any_slab_objects(struct kmem_cache *s) > > struct slab_attribute { > struct attribute attr; > + struct bin_attribute bin_attr; > ssize_t (*show)(struct kmem_cache *s, char *buf); > ssize_t (*store)(struct kmem_cache *s, const char *x, size_t count); > }; I'd rather you added a struct slab_bin_attribute. If that's even needed .. I think you could just use the bin_attribute directly instead of embedding it in this struct.