Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Oleg Nesterov
On 11/12, Peter Zijlstra wrote: > > On Tue, Nov 12, 2013 at 05:21:36PM +0100, Oleg Nesterov wrote: > > On 11/12, Peter Zijlstra wrote: > > > > > > static const char * const task_state_array[] = { > > > ... > > > + "I (idle)", /* 1024 */ > > > }; > > > > but I am not sure about what /

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 05:21:36PM +0100, Oleg Nesterov wrote: > On 11/12, Peter Zijlstra wrote: > > > > On Tue, Nov 12, 2013 at 02:21:39PM -, David Laight wrote: > > > Shame there isn't a process flag to indicate that the process > > > will sleep uninterruptibly and that it doesn't matter. > >

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Oleg Nesterov
On 11/12, Peter Zijlstra wrote: > > On Tue, Nov 12, 2013 at 02:21:39PM -, David Laight wrote: > > > > /* Tell scheduler we are going to sleep... */ > > if (signal_pending(current)) > > /* We don't want waking immediately (again) */ > > sleep_state = TASK_UNINTERRUPTIBLE;

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Oleg Nesterov
On 11/12, Peter Zijlstra wrote: > > On Tue, Nov 12, 2013 at 02:21:39PM -, David Laight wrote: > > Shame there isn't a process flag to indicate that the process > > will sleep uninterruptibly and that it doesn't matter. > > So don't count to the load average and don't emit a warning > > if it ha

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 02:21:39PM -, David Laight wrote: > Shame there isn't a process flag to indicate that the process > will sleep uninterruptibly and that it doesn't matter. > So don't count to the load average and don't emit a warning > if it has been sleeping for a long time. A process

RE: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread David Laight
> > I've done this in the past so that the code sleeps interruptibly > > unless there is a signal pending - which would cause it to return > > early. > > > > /* Tell scheduler we are going to sleep... */ > > if (signal_pending(current)) > > /* We don't want waking immediately (again

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 02:21:39PM -, David Laight wrote: > > > @@ -1637,7 +1637,7 @@ static int sync_thread_master(void *data) > > > continue; > > > } > > > while (ip_vs_send_sync_msg(tinfo->sock, sb->mesg) < 0) { > > > - int ret = __wait_e

RE: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread David Laight
> > @@ -1637,7 +1637,7 @@ static int sync_thread_master(void *data) > > continue; > > } > > while (ip_vs_send_sync_msg(tinfo->sock, sb->mesg) < 0) { > > - int ret = __wait_event_interruptible(*sk_sleep(sk), > > So ideally there's be a c

Re: [PATCH] ipvs: Remove unused variable ret from sync_thread_master()

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 02:53:16PM +0100, Geert Uytterhoeven wrote: > net/netfilter/ipvs/ip_vs_sync.c: In function 'sync_thread_master': > net/netfilter/ipvs/ip_vs_sync.c:1640:8: warning: unused variable 'ret' > [-Wunused-variable] > > Introduced by commit 35a2af94c7ce7130ca292c68b1d27fcfdb648f6b