mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/14] locking/atomic: import atomic_dec_not_zero()
Date: Tue, 31 Jan 2017 20:17:22 +0100	[thread overview]
Message-ID: <20170131191722.GR6515@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <320001703.34628.1485884488784.open-xchange@webmail.nmp.proximus.be>

On Tue, Jan 31, 2017 at 06:41:28PM +0100, Fabian Frederick wrote:
> 
> 
> > On 31 January 2017 at 11:41 Peter Zijlstra <peterz@infradead.org> wrote:
> >
> >
> > On Mon, Jan 30, 2017 at 07:39:38PM +0100, Fabian Frederick wrote:
> > > complementary definition to atomic_inc_not_zero() featured in
> > > lib/fault-inject.c
> >
> > Why?
> 
> Maybe this commit message should be ok ?
> 
> complementary definition to atomic_inc_not_zero() featured in lib/fault-inject.c
> and is more readable than atomic_add_unless((v), -1, 0) used in different
> places.

I still don't see why such a primitive makes sense. Yes there's a few
usage sites, but from them I don't see a sensible pattern.

What sane pattern desires this?

  reply	other threads:[~2017-01-31 19:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 18:39 Fabian Frederick
2017-01-31  7:33 ` Ingo Molnar
2017-01-31 10:41 ` Peter Zijlstra
2017-01-31 17:41   ` Fabian Frederick
2017-01-31 19:17     ` Peter Zijlstra [this message]
2017-01-31 20:55       ` Fabian Frederick
2017-02-01  9:25         ` Peter Zijlstra
2017-02-01 19:24           ` Fabian Frederick

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=20170131191722.GR6515@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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

Powered by JetHome