All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@comcast.net>
To: Satyam Sharma <satyam.sharma@gmail.com>
Cc: akpm@linux-foundation.org, oleg@tv-sign.ru, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] relay: use plain timer instead of delayed work
Date: Sun, 06 May 2007 22:31:31 -0500	[thread overview]
Message-ID: <1178508691.4534.4.camel@ubuntu> (raw)
In-Reply-To: <a781481a0705060310h3a9cb49asbbc8b7f5ddb38a8e@mail.gmail.com>

On Sun, 2007-05-06 at 15:40 +0530, Satyam Sharma wrote:
> Hi Tom,
> 
> On 5/6/07, Tom Zanussi <zanussi@comcast.net> wrote:
> > [...]
> > relay doesn't need to use schedule_delayed_work() for waking readers
> > when a simple timer will do.
> >
> > Signed-off-by: Tom Zanussi <zanussi@comcast.net>
> > [...]
> > diff --git a/include/linux/relay.h b/include/linux/relay.h
> > index 759a0f9..cac0732 100644
> > --- a/include/linux/relay.h
> > +++ b/include/linux/relay.h
> > @@ -38,7 +38,7 @@ struct rchan_buf
> >         size_t subbufs_consumed;        /* count of sub-buffers consumed */
> >         struct rchan *chan;             /* associated channel */
> >         wait_queue_head_t read_wait;    /* reader wait queue */
> > -       struct delayed_work wake_readers; /* reader wake-up work struct */
> > +       struct timer_list timer;        /* reader wake-up timer */
> >         struct dentry *dentry;          /* channel file dentry */
> >         struct kref kref;               /* channel buffer refcount */
> >         struct page **page_array;       /* array of current buffer pages */
> 
> I suspect you could now safely get rid of the "#include
> <linux/wait.h>" at the top of relay.h too. And although timer.h comes
> via #include <linux/sched.h>, you might want to do that explicitly
> too.
> 

Hi Satyam,

Thanks for your comments - I've updated the patch to include timer.h but
wait.h would still be needed for wait_queue_head_t, so will leave that
in.

Tom




  reply	other threads:[~2007-05-07  3:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06  4:46 [PATCH] relay: use plain timer instead of delayed work Tom Zanussi
2007-05-06 10:10 ` Satyam Sharma
2007-05-07  3:31   ` Tom Zanussi [this message]
2007-05-07  6:35     ` Satyam Sharma
2007-05-06 12:47 ` Oleg Nesterov
2007-05-07  3:29   ` Tom Zanussi
  -- strict thread matches above, loose matches on Subject: below --
2007-05-07  3:35 Tom Zanussi

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=1178508691.4534.4.camel@ubuntu \
    --to=zanussi@comcast.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=satyam.sharma@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.