linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John Kacur" <jkacur@gmail.com>
To: "Gilles Carry" <glscarry@free.fr>
Cc: "Gilles Carry" <gilles.carry@bull.net>,
	linux-rt-users@vger.kernel.org, tglx@linutronix.de,
	mingo@elte.hu, tinytim@us.ibm.com, jean-pierre.dion@bull.net,
	sebastien.dugue@bull.net
Subject: Re: [PATCH 2/2] [RT] hrtimer __run_hrtimer code cleanup
Date: Thu, 21 Aug 2008 15:03:11 +0200	[thread overview]
Message-ID: <520f0cf10808210603u2d63fe2dq9c34272ed510b89@mail.gmail.com> (raw)
In-Reply-To: <C9802590-A1FD-454C-9499-D6A07CBBBA01@free.fr>

On Thu, Aug 21, 2008 at 2:18 PM, Gilles Carry <glscarry@free.fr> wrote:
> Le 20 août 08 à 23:48, John Kacur a écrit :
>
>>
>> I kind of find this confusing, because the return value is only useful
>> in one specific instance. In other cases, the return value is thrown
>> away. People who are not aware of the history of this code and examine
>> it later may ask why the return value is being ignored in some cases.
>>
>>>
>
> John,
>
> I don't see anything confusing here. It's similar to a function where you
> have plenty
> of parameters and depending on the context, only a few are useful. In the
> present
> case, the timers mode names (...NOSOFTIRQ) speak for themselves. They don't
> need
> this return code.
> As there is already plenty of explanations and comments within the code,
> people 'not aware' will do as everbody else do: decrypt and understand. ;-)
> Anyway, I don't mind adding comments at the head of the function.
>
> My goal here is only to make the code more readable and easier to maintain
> by
> factorization this is why I separated this patch from the fix.
> If you look at the factorized code, you see the only difference is the
> raisesoftirq stuff.
> I thought it was worth doing it.
>
> Gilles.--
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

The goal of factorization is a good one of course. I also don't want
to argue too much about the implementation when you have done the
detective work to solve a hard problem, but I am just wondering if
there is a better way to do this - that would make the code even more
readable. As I go over this code again, I'm also thinking that it
conceptually doesn't really belong in the __run_timer function, even
if it works. If you look at the code before your changes, the function
__run_timer did just that, it ran a timer, but now it's manipulating
callback lists. Is there perhaps another way to common this code up
then?
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-08-21 13:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 14:42 [PATCH 0/2][RT] hrtimers stuck in waitqueue Gilles Carry
2008-08-18 14:42 ` [PATCH 1/2] [RT] " Gilles Carry
2008-08-19 14:10   ` Gregory Haskins
     [not found]     ` <789E827C-DB3F-451E-BFFF-4210433029DF@free.fr>
2008-08-20 10:57       ` Gregory Haskins
2008-08-21 13:16   ` John Kacur
2008-08-22  6:11     ` Gilles Carry
2008-08-22 14:39   ` Thomas Gleixner
2008-08-25 13:09     ` Gilles Carry
2008-08-18 14:42 ` [PATCH 2/2] [RT] hrtimer __run_hrtimer code cleanup Gilles Carry
2008-08-20 21:48   ` John Kacur
2008-08-21 12:18     ` Gilles Carry
2008-08-21 13:03       ` John Kacur [this message]
2008-08-22  6:04         ` Gilles Carry

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=520f0cf10808210603u2d63fe2dq9c34272ed510b89@mail.gmail.com \
    --to=jkacur@gmail.com \
    --cc=gilles.carry@bull.net \
    --cc=glscarry@free.fr \
    --cc=jean-pierre.dion@bull.net \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sebastien.dugue@bull.net \
    --cc=tglx@linutronix.de \
    --cc=tinytim@us.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).