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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 94E66C433DB for ; Tue, 12 Jan 2021 12:24:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52A1822BE9 for ; Tue, 12 Jan 2021 12:24:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387582AbhALMYM (ORCPT ); Tue, 12 Jan 2021 07:24:12 -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.