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: <1203980231.16711.115.camel@sven.thebigcorporation.com>
Date:	Mon, 25 Feb 2008 14:57:11 -0800
From:	Sven-Thorsten Dietrich <sdietrich@...ell.com>
To:	Pavel Machek <pavel@....cz>
Cc:	Gregory Haskins <ghaskins@...ell.com>, mingo@...e.hu,
	a.p.zijlstra@...llo.nl, tglx@...utronix.de, rostedt@...dmis.org,
	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	bill.huey@...il.com, kevin@...man.org, cminyard@...sta.com,
	dsingleton@...sta.com, dwalker@...sta.com, npiggin@...e.de,
	dsaxena@...xity.net, ak@...e.de, acme@...hat.com, gregkh@...e.de,
	pmorreale@...ell.com, mkohari@...ell.com
Subject: Re: [(RT RFC) PATCH v2 2/9] sysctl for runtime-control of lateral
	mutex stealing


On Mon, 2008-02-25 at 22:53 +0100, Pavel Machek wrote:
> Hi!
> 
> > From: Sven-Thorsten Dietrich <sdietrich@...e.de>
> > 
> > Add /proc/sys/kernel/lateral_steal, to allow switching on and off
> > equal-priority mutex stealing between threads.
> > 
> > Signed-off-by: Sven-Thorsten Dietrich <sdietrich@...e.de>
> > ---
> > 
> >  
> >  #include "rtmutex_common.h"
> >

I'll move it to the header file.

>   
> > +#ifdef CONFIG_RTLOCK_LATERAL_STEAL
> > +int rtmutex_lateral_steal __read_mostly = 1;
> > +#endif
> > +
> 
> Ugly..
> 

> 
> >  /*
> >   * lock->owner state tracking:
> >   *
> > @@ -321,7 +325,8 @@ static inline int lock_is_stealable(struct task_struct *pendowner, int unfair)
> >  	if (current->prio > pendowner->prio)
> >  		return 0;
> >  
> > -	if (!unfair && (current->prio == pendowner->prio))
> > +	if (unlikely(current->prio == pendowner->prio) &&
> > +	   !(unfair && rtmutex_lateral_steal))
> >  #endif
> 
> But this is even worse, you are creating #ifdef maze here. Can you
> simply #define rtmutex_lateral_steal 0 in !CONFIG_RTLOCK_LATERAL_STEAL
> and let the optimizer fix this?
> 

Ok - much of this will also disappear into the header then.

> 
> > index c913d48..c24c53d 100644
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -175,6 +175,10 @@ extern struct ctl_table inotify_table[];
> >  int sysctl_legacy_va_layout;
> >  #endif
> >  
> > +#ifdef CONFIG_RTLOCK_LATERAL_STEAL
> > +extern int rtmutex_lateral_steal;
> > +#endif
> > +
> 
> Try checkpatch.
> 									Pavel

I have that as part of quilt refresh, and it returns:

Your patch has no obvious style problems and is ready for submission.

But Greg may need to enforce it on his git tree that he mails these from
- are you referring to anything specific in this patch?

Sven

--
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