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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D3EAC4332F for ; Thu, 7 Oct 2021 09:21:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66BE261248 for ; Thu, 7 Oct 2021 09:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240595AbhJGJXU (ORCPT ); Thu, 7 Oct 2021 05:23:20 -0400 Received: from mga11.intel.com ([192.55.52.93]:29344 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240304AbhJGJXJ (ORCPT ); Thu, 7 Oct 2021 05:23:09 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="223604774" X-IronPort-AV: E=Sophos;i="5.85,354,1624345200"; d="scan'208";a="223604774" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 02:21:11 -0700 X-IronPort-AV: E=Sophos;i="5.85,354,1624345200"; d="scan'208";a="439457666" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 02:21:02 -0700 Received: from andy by smile with local (Exim 4.95) (envelope-from ) id 1mYPaE-009TlL-CK; Thu, 07 Oct 2021 12:20:58 +0300 Date: Thu, 7 Oct 2021 12:20:58 +0300 From: Andy Shevchenko To: Miguel Ojeda Cc: Greg Kroah-Hartman , Brendan Higgins , Peter Zijlstra , Alexey Dobriyan , Miguel Ojeda , Mauro Carvalho Chehab , Herbert Xu , linux-kernel , "open list:KERNEL SELFTEST FRAMEWORK" , kunit-dev@googlegroups.com, Linux Media Mailing List , Network Development , bpf , "Rafael J. Wysocki" , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Steven Rostedt , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Thomas Graf , Andrew Morton , Jonathan Cameron , Rasmus Villemoes Subject: Re: [PATCH v1 3/3] kernel.h: Split out container_of() and typeof_memeber() macros Message-ID: References: <20210713084541.7958-1-andriy.shevchenko@linux.intel.com> <20210713084541.7958-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 08:39:22PM +0200, Miguel Ojeda wrote: > On Tue, Jul 13, 2021 at 1:23 PM Greg Kroah-Hartman > wrote: > > > > Life is messy and can not easily be partitioned into tiny pieces. That > > way usually ends up being even messier in the end... > > I agree measurements would be ideal. > > Having said that, even if it makes no performance difference, I think > it is reasonable to split things (within reason) and makes a bunch of > other things easier, plus sometimes one can enforce particular > conventions in the separate header (like I did when introducing > `compiler_attributes.h`). It does almost 2% (steady) speedup. I will send a v2 with methodology and numbers of testing. -- With Best Regards, Andy Shevchenko