Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3142057pxj; Mon, 7 Jun 2021 03:28:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzGhrnxGmEm6zmho63eEUdxWTzjnawXAGYLUtVggeXspEDVAcQF80FJxQV5ghifnB5396k X-Received: by 2002:aa7:dc51:: with SMTP id g17mr19186456edu.43.1623061729676; Mon, 07 Jun 2021 03:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623061729; cv=none; d=google.com; s=arc-20160816; b=MLlWD2suyVk+DV8J+PhNQcOQmaHRF+Q6/Icg3YRBEhFuBN59LXrBIMuAlKT75tCRvK nTgGY2W/dQtVUrYtE2J77CCFamo+zzQeT9nkPVKbdL2Yy5rHl2sFX7iWA498NpS5j6Vp BH3ULOOoXrd2RVKI19G9XOoHauPeEBqqjo++XDJt4HORfaAO4AgWn20Cv1bZSSi6id9a MybswGPGdiEq/XDqKv5jHYrHU9QZCQrLjeORSpfIF+nN3e4PfxxBsa5ws6kb09MnGc3B y7Yg7WnvJHDI6lGXOnVO1zFuu8UAdqu75S2MAuWsTcF1gmC5h/8+9TYfUp6IsVi7nYXa bnQQ== 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=PiVTluT/tZkNIfOzGMGW8lZfwk32qI8Qa+zy3R7VfME=; b=lJ8sNLLtI7OSRkxh5YK8Cd/E88/kLY88GtWVbeEF7gRO1jphn9crEMi4yZvJoH2rBL 1oK1XDoziC5OWuvj5iQVvmbZ3bqzNvDsSeY6bLl/nvVQ4DF20NbNdjKwk+x4GUsa5mYF OLji7Rman38AxhbKPOZp5W1xhueYV0tokrTAc66zT6YhCmmCtRhkBPkWsFF393pnFSol zPmMeCuqJ4hoKmEi0u1kWt3+dYKKdpERmbpuyCBzW25R5HO1H3clrBNfoxaTuIyMBrzY RvN8KhCqHsi3X68G9iIvwmBEwhwrWJgNQI12Ov6+qaoKgQxWZTB51/ZPyjSr5aCVxPuV aFfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q1KbwVFv; 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 i2si13869622ejp.119.2021.06.07.03.28.26; Mon, 07 Jun 2021 03:28:49 -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=Q1KbwVFv; 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 S230267AbhFGK1G (ORCPT + 99 others); Mon, 7 Jun 2021 06:27:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:49760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbhFGK1F (ORCPT ); Mon, 7 Jun 2021 06:27:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D200611AD; Mon, 7 Jun 2021 10:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623061505; bh=amHnAOUniK9QiSutr2S+7gZcLass0vkZd3TBWEJb0fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q1KbwVFvpRKW3Dz/ZTL28TG7N9T8Aqklmazl/ndkcpoXmoHPySetgabW99iT5xJtp jSO8jPT6Im1A9NM3uSVn2JKGgqIAclJGSYN3Pa5f+jNl4tR+CU96B13PGdJarN3b84 69FaNtD8+MhDUxybhod854s8XNFfiwz0E+GDIlVQ= Date: Mon, 7 Jun 2021 12:25:03 +0200 From: Greg KH To: Leon Romanovsky Cc: Doug Ledford , Jason Gunthorpe , Kees Cook , Nathan Chancellor , Adit Ranadive , Ariel Elior , Christian Benvenuti , clang-built-linux@googlegroups.com, Dennis Dalessandro , Devesh Sharma , Gal Pressman , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Mustafa Ismail , Naresh Kumar PBS , Nelson Escobar , Nick Desaulniers , Potnuri Bharat Teja , Selvin Xavier , Shiraz Saleem , VMware PV-Drivers , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next v1 10/15] RDMA/cm: Use an attribute_group on the ib_port_attribute intead of kobj's Message-ID: References: <00e578937f557954d240bc0856f45b3f752d6cba.1623053078.git.leonro@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00e578937f557954d240bc0856f45b3f752d6cba.1623053078.git.leonro@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 11:17:35AM +0300, Leon Romanovsky wrote: > From: Jason Gunthorpe > > This code is trying to attach a list of counters grouped into 4 groups to > the ib_port sysfs. Instead of creating a bunch of kobjects simply express > everything naturally as an ib_port_attribute and add a single > attribute_groups list. > > Remove all the naked kobject manipulations. Much nicer. But why do you need your counters to be atomic in the first place? What are they counting that requires this? Given that they are just a statistic for userspace, making them be a u64 should work just the same, right? thanks, greg k-h