mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vadim Lobanov <vlobanov@speakeasy.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Poll microoptimizations.
Date: Fri, 14 Apr 2006 14:47:29 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0604141440180.30907@shell2.speakeasy.net> (raw)
In-Reply-To: <20060414143820.6a04b696.akpm@osdl.org>

On Fri, 14 Apr 2006, Andrew Morton wrote:

> Vadim Lobanov <vlobanov@speakeasy.net> wrote:
> >
> > I can put in a comment to explain what the code is doing, or if you
> > think that the bitmasking itself is "yuk", then I can easily transform
> > the code into an explicit "if () {}" block. :)
>
> yes please.
>
> > > Yuk.  Sorry, no.
> >
> > Thank you for the review. The comments above are easy to address. Do you
> > like the main concept behind the patch? Should I correct and resubmit?
>
> I don't really understand it yet.

It's really a bit of (subjective) cleanup, that just incidentally
happens to save us a few extra clock cycles here and there. In the
current code, the "count" and "pt" variables are modified both in the
function where they're declared (do_poll()), AND also indirectly in a
different function (do_pollfd()). The patch moves all handling of these
variables to the function that declares and "owns" them (do_poll()).

> Yes, please resend and feel free to a) add comments in places where we can
> help people to understand the code and b) convert any code which gets
> touched to be coding-style-friendly.  (I usually recommend that we do that
> even if the surrounding code uses different conventions - eventually
> everything will be fixed ;))

I couldn't agree more on this particular point. The only thing that
stops me is that noone can ever agree on the coding style, even if it is
spelled out in the Documentation/ directory (witness the periodic flame
wars on this list). Helps to have a thick skin, and I'm slowly getting
to that point. ;)

I'll correct, comment, and resend the patch when I get a chance.

- Vadim Lobanov

  reply	other threads:[~2006-04-14 21:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-14  4:21 Vadim Lobanov
2006-04-14 15:51 ` Vadim Lobanov
2006-04-14 19:31 ` Andrew Morton
2006-04-14 21:21   ` Vadim Lobanov
2006-04-14 21:38     ` Andrew Morton
2006-04-14 21:47       ` Vadim Lobanov [this message]
2006-04-15  2:26       ` [PATCH] Poll cleanups/microoptimizations Vadim Lobanov

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=Pine.LNX.4.58.0604141440180.30907@shell2.speakeasy.net \
    --to=vlobanov@speakeasy.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®