All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Blackwood <john.blackwood@ccur.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: general@lists.openfabrics.org, linux-rt-users@vger.kernel.org,
	Sven-Thorsten Dietrich <sdietrich@novell.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [ofa-general] [PATCH] [WORKAROUND] CONFIG_PREEMPT_RT and ib_umad_close() issue
Date: Mon, 17 Sep 2007 19:41:22 -0400	[thread overview]
Message-ID: <46EF10A2.40905@ccur.com> (raw)
In-Reply-To: <adair69nf7r.fsf@cisco.com>

Roland Dreier wrote:
> Thanks for the explanation...
> 
>  > But basically, with CONFIG_PREEMPT_RT enabled, the lock points, such as
>  > aqcuiring a spinlock, potentially become places where the current task
>  > may be context switched out / preempted.
>  > 
>  > Therefore, when a call is made to lock a spinlock for example, the
>  > caller should not currently have irqs disabled, or preemption disabled,
>  > since a context switch may occur.
> 
> this doesn't seem relevant here...

Hi Roland,

right.  just some background info.

>  > void fastcall rt_downgrade_write(struct rw_semaphore *rwsem)
>  > {
>  >         BUG();
>  > }
> 
> this seems to be the problem... the -rt patch turns downgrade_write()
> into a BUG().
> 
> I need to look at the locking in user_mad.c again, but I think it may
> be possible to replace both places that do downgrade_write() with
> up_write() followed by down_read().
> 
>  - R.


that sounds like it would be a good solution for both preempt rt and 
non-preempt rt kernels.

thanks again for looking at this for us.

WARNING: multiple messages have this Message-ID (diff)
From: John Blackwood <john.blackwood@ccur.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sven-Thorsten Dietrich <sdietrich@novell.com>,
	general@lists.openfabrics.org
Subject: Re: [ofa-general] [PATCH] [WORKAROUND] CONFIG_PREEMPT_RT and ib_umad_close() issue
Date: Mon, 17 Sep 2007 19:41:22 -0400	[thread overview]
Message-ID: <46EF10A2.40905@ccur.com> (raw)
In-Reply-To: <adair69nf7r.fsf@cisco.com>

Roland Dreier wrote:
> Thanks for the explanation...
> 
>  > But basically, with CONFIG_PREEMPT_RT enabled, the lock points, such as
>  > aqcuiring a spinlock, potentially become places where the current task
>  > may be context switched out / preempted.
>  > 
>  > Therefore, when a call is made to lock a spinlock for example, the
>  > caller should not currently have irqs disabled, or preemption disabled,
>  > since a context switch may occur.
> 
> this doesn't seem relevant here...

Hi Roland,

right.  just some background info.

>  > void fastcall rt_downgrade_write(struct rw_semaphore *rwsem)
>  > {
>  >         BUG();
>  > }
> 
> this seems to be the problem... the -rt patch turns downgrade_write()
> into a BUG().
> 
> I need to look at the locking in user_mad.c again, but I think it may
> be possible to replace both places that do downgrade_write() with
> up_write() followed by down_read().
> 
>  - R.


that sounds like it would be a good solution for both preempt rt and 
non-preempt rt kernels.

thanks again for looking at this for us.

  reply	other threads:[~2007-09-17 23:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 17:19 [ofa-general] [PATCH] [WORKAROUND] CONFIG_PREEMPT_RT and ib_umad_close() issue John Blackwood
2007-09-17 21:40 ` Roland Dreier
2007-09-17 21:40   ` Roland Dreier
2007-09-17 23:41   ` John Blackwood [this message]
2007-09-17 23:41     ` John Blackwood
  -- strict thread matches above, loose matches on Subject: below --
2007-09-17 15:22 John Blackwood
2007-09-17 15:56 ` [ofa-general] " Roland Dreier
2007-09-17 15:56   ` Roland Dreier
2007-09-17 17:07   ` Daniel Walker

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=46EF10A2.40905@ccur.com \
    --to=john.blackwood@ccur.com \
    --cc=general@lists.openfabrics.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=sdietrich@novell.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.