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: <20110121132349.GB6051@zhy>
Date:	Fri, 21 Jan 2011 21:23:49 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Torben Hohn <torbenh@....de>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...x.de>
Subject: Re: [PATCH] RFC: abstract access to xtime_lock into a set of
 inline functions

On Thu, Jan 20, 2011 at 12:30:29PM -0500, Christoph Hellwig wrote:
> On Thu, Jan 20, 2011 at 06:14:08PM +0100, Torben Hohn wrote:
> > the -rt patches change the xtime_lock to a raw_seqlock_t
> > so a pretty huge portion of the patch deals with changing
> > the locking functions.
> > 
> > this commit uses inline functions, to hide the type
> > of the lock.
> 
> That's not how kernel code usually works.
> 
> > -	write_seqlock(&xtime_lock);
> > +	xtime_write_seqlock();
> >  	do_timer(1);
> > -	write_sequnlock(&xtime_lock);
> > +	xtime_write_sequnlock();
> 
> However there's a pretty clear pattern of taking xtime_lock, calling
> do_timer and then releasing.  A useful thing you could do is to rename
> do_timer to do_timer_locked and make do_timer take and release
> xtime_lock in one place.

How about adding raw_seqlock just like what we have done for
spinlock? Thus xtime_lock can be defined to raw_seqlock and
others can also benefit from the raw_seqlock like xtime_lock.

Thanks,
Yong
--
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