All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@scarlet.be>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] some more questions about __raw_write_trylock() hppa implementation
Date: Wed, 30 Aug 2006 20:23:39 +0000	[thread overview]
Message-ID: <44F5F3CB.30806@scarlet.be> (raw)

Hello all,

I noticed that:
static  __inline__ int __raw_write_trylock(raw_rwlock_t *rw)
{
         __raw_spin_lock(&rw->lock);
         if (rw->counter != 0) {
                 /* this basically never happens */
                 __raw_spin_unlock(&rw->lock);

                 return 0;
         }

         /* got it.  now leave without unlocking */
         rw->counter = -1; /* remember we are locked */
         return 1;
}


so depending the counter is null or not the lock is kept or relaxed?

following my smp pb invextigation the pb I encounter seems to occure rarely and so according to above comment "/* this basically 
never happens */" I place here a panic() in the hope to get a better trace if it start to hang by this place. Unfortunately the 
comment is wrong and system panicing at boot time ;-(

Looking to some other implementation (powerpc and sh in particular), I don't have the feeling that this fnct should have to keep the 
lock in any case. Any idea?

Thanks,
	Joel

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

             reply	other threads:[~2006-08-30 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 20:23 Joel Soete [this message]
2006-08-31  3:59 ` [parisc-linux] some more questions about __raw_write_trylock() hppa implementation Matthew Wilcox
2006-08-31  6:06   ` Grant Grundler
2006-08-31 12:31     ` Matthew Wilcox
2006-08-31 13:01       ` Michael S. Zick
2006-08-31 13:13         ` Matthew Wilcox
2006-08-31 16:08           ` Grant Grundler
2006-08-31 16:27       ` Grant Grundler
2006-09-01 14:01         ` Matthew Wilcox
2006-09-01 15:57           ` Grant Grundler
2006-09-01 17:19             ` Matthew Wilcox

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=44F5F3CB.30806@scarlet.be \
    --to=soete.joel@scarlet.be \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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.