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]
Date:	Wed, 1 Aug 2007 22:26:58 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Daniel Walker <dwalker@...sta.com>
Cc:	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	Gregory Haskins <ghaskins@...ell.com>,
	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RT: Add priority-queuing and priority-inheritance to workqueue infrastructure

On 08/01, Daniel Walker wrote:
>
> On Wed, 2007-08-01 at 19:01 +0200, Peter Zijlstra wrote:
> > >  static void insert_work(struct cpu_workqueue_struct *cwq,
> > >  				struct work_struct *work, int tail)
> > >  {
> > > +	int prio = current->normal_prio;
> > > +
> > >  	set_wq_data(work, cwq);
> > >  	/*
> > >  	 * Ensure that we get the right work->data if we see the
> > >  	 * result of list_add() below, see try_to_grab_pending().
> > >  	 */
> > >  	smp_wmb();
> > > -	if (tail)
> > > -		list_add_tail(&work->entry, &cwq->worklist);
> > > -	else
> > > -		list_add(&work->entry, &cwq->worklist);
> > > +	plist_node_init(&work->entry, prio);
> > > +	plist_add(&work->entry, &cwq->worklist);
> > 
> > perhaps we ought to handle tail, perhaps not, not sure what the
> > consequences are.
> 
> The plist doesn't distinguish since it's a sorted list. There is no way
> to force something to the back of the list ..
> 
> It seems like the "tail" option was the old way to prioritize..  I think
> It could be removed since we're always priority ordering now anyway..

No, the "tail" option has nothing to do with prioritize, we can't remove
it. Please look at the code.

Also, flush_workqueue() must not be delayed by the new incoming work_struct's,
the change like this breaks this assumption.

Oleg.

-
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