From: Greg KH <gregkh@linuxfoundation.org>
To: Deepak R Varma <drv@mailo.com>
Cc: Julia Lawall <julia.lawall@inria.fr>, Alex Elder <elder@ieee.org>,
Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>,
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
Date: Thu, 23 Mar 2023 06:22:55 +0100 [thread overview]
Message-ID: <ZBviL+IuY43djHyS@kroah.com> (raw)
In-Reply-To: <ZBveN3HT96/cktRI@ubun2204.myguest.virtualbox.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
next prev parent reply other threads:[~2023-03-23 5:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 18:34 [PATCH v2] staging: greybus: use inline function for macros Menna Mahmoud
2023-03-21 18:50 ` Alex Elder
2023-03-21 20:43 ` Julia Lawall
2023-03-21 21:09 ` Alex Elder
2023-03-21 21:29 ` Julia Lawall
2023-03-21 22:42 ` Alex Elder
2023-03-22 10:00 ` Julia Lawall
2023-03-22 12:39 ` Alex Elder
2023-03-23 4:58 ` Greg KH
2023-03-23 5:05 ` Deepak R Varma
2023-03-23 5:22 ` Greg KH [this message]
2023-03-23 19:46 ` Deepak R Varma
2023-03-23 9:52 ` Julia Lawall
2023-03-25 8:49 ` Greg KH
2023-03-25 9:28 ` Julia Lawall
2023-03-22 9:13 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2023-03-19 20:49 Menna Mahmoud
2023-03-19 20:56 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBviL+IuY43djHyS@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=drv@mailo.com \
--cc=elder@ieee.org \
--cc=elder@kernel.org \
--cc=eng.mennamahmoud.mm@gmail.com \
--cc=johan@kernel.org \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox