linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: ssantosh@kernel.org
Cc: akpm@linux-foundation.org, davem@davemloft.net,
	giovanni.cabiddu@intel.com, gregkh@linuxfoundation.org,
	herbert@gondor.apana.org.au, isdn@linux-pingi.de, mingo@elte.hu,
	pebolle@tiscali.nl, peterz@infradead.org,
	salvatore.benedetto@intel.com, tadeusz.struk@intel.com,
	tglx@linutronix.de, mm-commits@vger.kernel.org,
	linux-kernel@vger.kernel.org, sfr@canb.auug.org.au,
	linux-next@vger.kernel.org, sergey.senozhatsky@gmail.com,
	sergey.senozhatsky.work@gmail.com
Subject: Re: + softirq-fix-tasklet_kill-and-its-users.patch added to -mm tree
Date: Wed, 21 Sep 2016 17:09:43 +0900	[thread overview]
Message-ID: <20160921080942.GA476@swordfish> (raw)
In-Reply-To: <20160921051810.GA396@swordfish>

didn't look into the issue, but this thing

> > tasklet_init() == Init and Enable scheduling
[..]
> > @@ -559,7 +559,7 @@ void tasklet_init(struct tasklet_struct
> >  {
> >  	t->next = NULL;
> >  	t->state = 0;
> > -	atomic_set(&t->count, 0);
> > +	atomic_set(&t->count, 1);
			^^^^^^^^
> >  	t->func = func;
> >  	t->data = data;
> >  }

seems to be in conflict with

 #define DECLARE_TASKLET(name, func, data) \
 struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
						^^^^^^^

 #define DECLARE_TASKLET_DISABLED(name, func, data) \
 struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
						^^^^^^^


as well as with the tasklet_{disable, enable} helpers

static inline void tasklet_disable_nosync(struct tasklet_struct *t)
{
	atomic_inc(&t->count);
	smp_mb__after_atomic();
}

static inline void tasklet_disable(struct tasklet_struct *t)
{
	tasklet_disable_nosync(t);
	tasklet_unlock_wait(t);
	smp_mb();
}

static inline void tasklet_enable(struct tasklet_struct *t)
{
	smp_mb__before_atomic();
	atomic_dec(&t->count);
}

	-ss

  reply	other threads:[~2016-09-21  8:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <57e1b041.zRoBcsxStpPQoyeo%akpm@linux-foundation.org>
2016-09-21  5:18 ` + softirq-fix-tasklet_kill-and-its-users.patch added to -mm tree Sergey Senozhatsky
2016-09-21  8:09   ` Sergey Senozhatsky [this message]
2016-09-21 17:23     ` Santosh Shilimkar
2016-09-22  0:42       ` Sergey Senozhatsky
2016-09-22  2:31         ` Santosh Shilimkar
2016-09-22  7:05           ` Thomas Gleixner
2016-09-22 16:08             ` Santosh Shilimkar
2016-09-22 23:37             ` Stephen Rothwell

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=20160921080942.GA476@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=giovanni.cabiddu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=isdn@linux-pingi.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=peterz@infradead.org \
    --cc=salvatore.benedetto@intel.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=ssantosh@kernel.org \
    --cc=tadeusz.struk@intel.com \
    --cc=tglx@linutronix.de \
    /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).