linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Torben Hohn <torbenh@gmx.de>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@tglx.de>
Subject: Re: [PATCH] RFC: abstract access to xtime_lock into a set of inline functions
Date: Thu, 20 Jan 2011 12:30:29 -0500	[thread overview]
Message-ID: <20110120173029.GA26121@infradead.org> (raw)
In-Reply-To: <1295543648-13788-1-git-send-email-torbenh@gmx.de>

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.


  reply	other threads:[~2011-01-20 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 17:14 [PATCH] RFC: abstract access to xtime_lock into a set of inline functions Torben Hohn
2011-01-20 17:30 ` Christoph Hellwig [this message]
2011-01-20 19:37   ` john stultz
2011-01-21 13:38     ` [PATCH] RFC: change do_timer() to take xtime lock, and provide do_timer_locked() Torben Hohn
2011-01-21 13:59       ` Thomas Gleixner
2011-01-21 13:57     ` [PATCH] RFC: abstract access to xtime_lock into a set of inline functions Thomas Gleixner
2011-01-21 13:23   ` Yong Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110120173029.GA26121@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@tglx.de \
    --cc=torbenh@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).