From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jack Steiner <steiner@sgi.com>
Cc: akpm@linux-foundation.org, npiggin@suse.de, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] - GRU Driver V3 fixes to resolve code review comments
Date: Tue, 29 Jul 2008 12:02:01 +1000 [thread overview]
Message-ID: <200807291202.01991.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080728200559.GA26689@sgi.com>
On Tuesday 29 July 2008 06:05, Jack Steiner wrote:
> Index: linux/drivers/misc/sgi-gru/grutlbpurge.c
> ===================================================================
> --- linux.orig/drivers/misc/sgi-gru/grutlbpurge.c 2008-07-28
> 14:52:26.000000000 -0500 +++
> linux/drivers/misc/sgi-gru/grutlbpurge.c 2008-07-28 14:52:54.000000000
> -0500 @@ -242,7 +242,9 @@ static void gru_invalidate_range_end(str
> struct gru_mm_struct *gms = container_of(mn, struct gru_mm_struct,
> ms_notifier);
>
> - atomic_dec(&gms->ms_range_active);
> + /* ..._and_test() provides needed barrier */
> + (void)atomic_dec_and_test(&gms->ms_range_active);
> +
> wake_up_all(&gms->ms_wait_queue);
What about
if (atomic_dec_and_test())
wake_up_all()
?
Also, I would prefer either a comment to say why the increment of
ms_range_active is safe, or an smp_mb__after_atomic_inc() for it too.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-07-29 2:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 20:05 Jack Steiner
2008-07-29 2:02 ` Nick Piggin [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=200807291202.01991.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=steiner@sgi.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