mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Tom Zanussi" <zanussi@comcast.net>
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, 6 May 2007 15:40:10 +0530	[thread overview]
Message-ID: <a781481a0705060310h3a9cb49asbbc8b7f5ddb38a8e@mail.gmail.com> (raw)
In-Reply-To: <1178426780.29337.67.camel@ubuntu>

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.

Satyam

  reply	other threads:[~2007-05-06 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06  4:46 Tom Zanussi
2007-05-06 10:10 ` Satyam Sharma [this message]
2007-05-07  3:31   ` Tom Zanussi
2007-05-07  6:35     ` Satyam Sharma
2007-05-06 12:47 ` Oleg Nesterov
2007-05-07  3:29   ` Tom Zanussi
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=a781481a0705060310h3a9cb49asbbc8b7f5ddb38a8e@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=zanussi@comcast.net \
    /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

all inboxes | Powered by JetHome®