public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Tejun Heo <htejun@gmail.com>
Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] file: kill unnecessary timer in fdtable_defer
Date: Mon, 21 Aug 2006 10:02:57 +0530	[thread overview]
Message-ID: <20060821043257.GD5433@in.ibm.com> (raw)
In-Reply-To: <20060820131542.GN6371@htj.dyndns.org>

On Sun, Aug 20, 2006 at 10:15:42PM +0900, Tejun Heo wrote:
> free_fdtable_rc() schedules timer to reschedule fddef->wq if
> schedule_work() on it returns 0.  However, schedule_work() guarantees
> that the target work is executed at least once after the scheduling
> regardless of its return value.  0 return simply means that the work
> was already pending and thus no further action was required.

Hmm.. Is this really true ? IIRC, schedule_work() checks pending
work based on bit ops on work->pending and clear_bit() is not
a memory barrier. So, if I see work->pending = 1 in free_fdtable_work(), how
do I know that the work function is already executing and
missed the new work that I had queued ?


Thanks
Dipankar

  reply	other threads:[~2006-08-21  4:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-20 13:15 [PATCH] file: kill unnecessary timer in fdtable_defer Tejun Heo
2006-08-21  4:32 ` Dipankar Sarma [this message]
2006-08-21  5:18   ` Tejun Heo
2006-08-21  7:58     ` Dipankar Sarma
2006-08-21  8:24       ` Tejun Heo
2006-09-22 15:46       ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2006-10-17 11:16 Tejun Heo

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=20060821043257.GD5433@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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