lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a781481a0705060310h3a9cb49asbbc8b7f5ddb38a8e@mail.gmail.com>
Date:	Sun, 6 May 2007 15:40:10 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Tom Zanussi" <zanussi@...cast.net>
Cc:	akpm@...ux-foundation.org, oleg@...sign.ru,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] relay: use plain timer instead of delayed work

Hi Tom,

On 5/6/07, Tom Zanussi <zanussi@...cast.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@...cast.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ