public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Char: ds1286, eliminate busy waiting
Date: Tue, 29 Jul 2008 11:42:08 +0200	[thread overview]
Message-ID: <488EE5F0.7020302@gmail.com> (raw)
In-Reply-To: <20080728230533.GB1430@linux-mips.org>

Ralf Baechle napsal(a):
> On Fri, Jul 25, 2008 at 07:49:58PM +0200, Jiri Slaby wrote:
> 
>> ds1286_get_time(); is not called from atomic context, sleep for 20 ms is
>> better choice than a (home-made) busy waiting for such a situation.

> Looks ok to me I guess.  Though I don't really think it matters ...

I think RT people has different opinion ;).

> The same condition also appears in drivers/char/rtc.c and maybe a few
> others.  Rtc.c has been copies and modified several times.

In rtc.c there is something completely different:
         while (rtc_is_updating() != 0 &&
                time_before(jiffies, uip_watchdog + 2*HZ/100))
                 cpu_relax();

It's a conditional busy-waiting. It reads the rtc status after each busy 
cycle while in the ds1286 there was
         if (ds1286_is_updating() != 0)
                 while (time_before(jiffies, uip_watchdog + 2*HZ/100))
                         barrier();

      reply	other threads:[~2008-07-29  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 17:49 [PATCH 1/1] Char: ds1286, eliminate busy waiting Jiri Slaby
2008-07-28 23:05 ` Ralf Baechle
2008-07-29  9:42   ` Jiri Slaby [this message]

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=488EE5F0.7020302@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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