From: Pavel Machek <pavel@ucw.cz>
To: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 6/6] cpu_relax(): ptrace.c coding style fix
Date: Thu, 22 Jun 2006 17:08:18 +0200 [thread overview]
Message-ID: <20060622150817.GB2959@openzaurus.ucw.cz> (raw)
In-Reply-To: <20060621210046.GF22516@rhlx01.fht-esslingen.de>
Hi!
> Fix existing cpu_relax() loop to have proper kernel style.
..but you change the code, not its style.
> @@ -182,9 +182,8 @@
> if (!write_trylock(&tasklist_lock)) {
> local_irq_enable();
> task_unlock(task);
> - do {
> + while (!write_can_lock(&tasklist_lock))
> cpu_relax();
> - } while (!write_can_lock(&tasklist_lock));
> goto repeat;
> }
I guess that barrier was needed before write_can_lock can succeed.
=> your version does one unneccessary test.
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
prev parent reply other threads:[~2006-06-22 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 21:00 Andreas Mohr
2006-06-22 14:32 ` Nathan Lynch
2006-06-22 15:53 ` Andreas Mohr
2006-06-22 15:08 ` Pavel Machek [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=20060622150817.GB2959@openzaurus.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=andi@rhlx01.fht-esslingen.de \
--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®