Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp2352037qtg; Wed, 22 Mar 2023 22:31:09 -0700 (PDT) Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dgrgNI0c X-Google-Smtp-Source: AK7set8ylsleoFEQ06Sg8BrEAf3F+PHruhxjRbK2JO8cquYve/UZghQ1ItvN0c1lLhTINm6y99+Z X-Received: by 2002:a17:90a:191:b0:237:24eb:99d8 with SMTP id 17-20020a17090a019100b0023724eb99d8mr6889280pjc.19.1679549469683; Wed, 22 Mar 2023 22:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679549469; cv=none; d=google.com; s=arc-20160816; b=N0GOtPjAZLd1E3B2qv1RJenDvvM0KGZF8HzLbPqonQnO6ReEowr1ePcuudaXMWgpf7 jLfJ64KmwSAXnnvMWP/kAIbV13QZ9I68pBtrk0aJ0EAZhH8/3WiPamJpr08rbdyHZY/f /BRPq24JnZ1Yt3ub5r8as9BfSYgzs5OeBUHg16hil9IH3Cw63mUT78v59IbdE6YFYp/F +w1qyKbPFeowTJy1skiH/3Gao3Luf7xaL8BT+aW0p48d/egsswaWxdWC4PVOtgxsV2+D cMaAAwItJFkzDe/sBnwR67Ax8DmEMHCVBm+kXVY20Dq8/H0t7/GxVNl263haobCztVJd Q6qg== 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=YXIEIHyqWI8EV9X0kiHD1Yu/iO18rzUT7QXM63m+YLk=; b=VG2tZh5AXUB+xRBDpRvoyaRR79j6czBiaw8ZPHy8slOR2ge/oY1TsC1UpTP1Z29cD5 +pjZE+yYo73gxoiU2IoFEocxRkgnMq3+7Gp/J8PMYhkxSJgy0qqKg73/OPiKUpMlyHE0 pRL2WIKq1hkFsGTS7V3Foq9y/V2k5acJahIHZt8s/YVScRGtrjkJso0h4cVXtuqPBjNw uDitbZQAgq96cLmXzVXAUF1dVNpGdc36Z8oM5RLDFDVGYPfwY3k9S3od7FdA3NclW+eW OFo+XKmJIAysrOhDiWbdE5rp1PhUWxINfSNGMT7X8ifLdInKh9kJDig8sejDamEbDb0i 0y+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dgrgNI0c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t4-20020a17090a6a0400b0023033ddad2fsi889102pjj.73.2023.03.22.22.30.58; Wed, 22 Mar 2023 22:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dgrgNI0c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229891AbjCWFXD (ORCPT + 99 others); Thu, 23 Mar 2023 01:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjCWFXB (ORCPT ); Thu, 23 Mar 2023 01:23:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD03E30E7 for ; Wed, 22 Mar 2023 22:23:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 53F88B81EDF for ; Thu, 23 Mar 2023 05:22:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71A1EC433EF; Thu, 23 Mar 2023 05:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679548978; bh=rNrfvpy2HzWHkPct+hqcH/KHmu0jX3CjJR2Do9AOHJU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dgrgNI0cDyF3ZNRmaWnY2X7ueTcKguDOFF5iF9ow8yzOgFRTM10RxUOrTaQH1raSK RzrxkkxCrqmwYc/60v4B3OK0NUahknbh8dei7XWdD1wE/uSHO6eq1AUCevajuiKOIU pEXUUmqrMv1mjH0XGv1RnG9MsAIxmcmZnHMC6TDs= Date: Thu, 23 Mar 2023 06:22:55 +0100 From: Greg KH To: Deepak R Varma Cc: Julia Lawall , Alex Elder , Menna Mahmoud , outreachy@lists.linux.dev, johan@kernel.org, elder@kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v2] staging: greybus: use inline function for macros Message-ID: References: <20230321183456.10385-1-eng.mennamahmoud.mm@gmail.com> <2e869677-2693-6419-ea25-f0cc2efcf3dd@ieee.org> <5efa6e6d-8573-31de-639a-d15b2e9deca0@ieee.org> <48674d8f-9753-780c-f37c-f83ea2855ae6@ieee.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 23, 2023 at 10:35:59AM +0530, Deepak R Varma wrote: > On Thu, Mar 23, 2023 at 05:58:02AM +0100, Greg KH wrote: > > Nice, that shows that it is the same both ways as the compiler version > > you are using is smart enough > > > > Which compiler and version is this? Does it work the same for all of > > the supported versions we have to support (i.e. really old gcc?) > > > > For the most part, sysfs files are not on any sort of "fast path" so a > > Hello, > Is there a guideline/documentation on how to identify if a code is part of > fast/slow path? Not really, the general rule is if the code is used in a function that is time criticial, then it is in the "fast path". Normally the code path for I/O or for determining what process to schedule next is a "fast path" as you want to do the least amount of work in the kernel so as to get the I/O to the hardware or caller, or you want to schedule the next process faster so that it can do the real work that is wanted. But for some I/O, where the hardware is the limiting factor (like slow USB or serial connections), no matter how optimized the kernel is, the data can not get to the user any faster because the hardware just can not provide it, so for that, it's not really that critical. Note that "time critical" can change depending on the user of the system and as hardware evolves. One example would be the creation of a number of sysfs entries for the disks in the systems. On a "normal" system, creating them all is trivial as there are not many disks. But on some "big" systems with many tens of thousands of disks, it can become a boot time bottleneck. So it's usually "you know it when you see it show up on a profile", use the perf tool to test your workload on, to see where in the kernel things are taking up too much time so you know what needs to be made faster. hope this helps, greg k-h