From: jmerkey@wolfmountaingroup.com
To: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
Cc: jmerkey@wolfmountaingroup.com, linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] mdb-2.6.27-rc2-ia32-08-07-08.patch
Date: Thu, 7 Aug 2008 09:56:10 -0600 (MDT) [thread overview]
Message-ID: <1923.69.2.248.210.1218124570.squirrel@webmail.wolfmountaingroup.com> (raw)
In-Reply-To: <489B1BDC.1010504@s5r6.in-berlin.de>
> Stefan Richter wrote:
>> jmerkey@wolfmountaingroup.com wrote:
>>> ftp://ftp.wolfmountaingroup.org/pub/mdb/mdb-2.6.27-rc2-ia32-08-07-08.patch
> ...
>>> +typedef struct _RLOCK
>>> +{
>>> +#if defined(CONFIG_SMP)
>>> + spinlock_t lock;
>>> +#endif
>>> + unsigned long flags;
>>> + unsigned long processor;
>>> + unsigned long count;
>>> +} rlock_t;
> ...
>> The accessors rspin_lock() and rspin_try_lock() peek into spinlock_t and
>> may therefore not be fully portable. Also, they and rspin_unlock()
>> don't look SMP safe:
> ...
>>> + if (rlock->lock.raw_lock.slock && rlock->processor == proc)
>
> Correction: They _are_ not portable. Look at the first hit in
> http://lxr.linux.no/linux+v2.6.26/+code=raw_spinlock_t .
OK. One more to fix. I have to be able to take nested page faults inside
the debugger in the event I am debugging a page fault handler or paging
event and someone's working set routine crashes.
rspin locks are for these types of cases -- so if I fault on the same
processor I took the lock on it just bumps a counter -- yes, it is atomic
and SMP safe to do it this way. You are correct that its non-portable
but the file this is in is named mdb-IA32 and is not meant as portable to
anything other than intel anyway.
As for coding style and misuse of a raw lock structure, I agree with you
completely, and I will look for a better way to do this without exposing
this structure.
Jeff
> --
> Stefan Richter
> -=====-==--- =--- --===
> http://arcgraph.de/sr/
>
next prev parent reply other threads:[~2008-08-07 16:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 14:29 jmerkey
2008-08-07 15:49 ` Stefan Richter
2008-08-07 15:59 ` Stefan Richter
2008-08-07 15:56 ` jmerkey [this message]
2008-08-07 16:46 ` Stefan Richter
2008-08-07 16:33 ` jmerkey
2008-08-07 17:19 ` Stefan Richter
2008-08-07 17:33 ` Stefan Richter
2008-08-07 17:52 ` jmerkey
2008-08-07 17:52 ` jmerkey
2008-08-07 16:04 ` jmerkey
2008-08-09 5:07 ` Jeremy Fitzhardinge
2008-08-09 8:04 ` Stefan Richter
2008-08-09 14:44 ` jmerkey
2008-08-08 2:18 ` Parag Warudkar
2008-08-08 4:33 Parag Warudkar
2008-08-08 13:11 ` jmerkey
[not found] ` <37357.166.70.238.45.1218201115.squirrel@webmail.wolfmountaingroup.com >
2008-08-08 13:23 ` jmerkey
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=1923.69.2.248.210.1218124570.squirrel@webmail.wolfmountaingroup.com \
--to=jmerkey@wolfmountaingroup.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.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
all inboxes | Powered by JetHome®