From: Matthew Wilcox <matthew@wil.cx>
To: Kyle McMartin <kyle@parisc-linux.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [PATCH] Remove spinlock_t from cpu_data (and thus from processor.h)
Date: Sun, 26 Nov 2006 11:38:32 -0700 [thread overview]
Message-ID: <20061126183832.GK14076@parisc-linux.org> (raw)
In-Reply-To: <20061125165344.GA29949@athena.road.mcmartin.ca>
On Sat, Nov 25, 2006 at 11:53:44AM -0500, Kyle McMartin wrote:
> This should enable us to clean up our header files nicely.
Thanks for looking at this.
My first thought was "Surely there's a better way to do this, maybe
DEFINE_PER_CPU".
Then I looked at what you'd had to touch. Essentially, we're
multiplexing 6 different ops onto one interrupt. This would make sense
if we were short of interrupts, but on the vast majority of systems, we
aren't.
We define NOP, RESCHEDULE, CALL_FUNC, CPU_START, CPU_STOP and CPU_TEST.
CPU_TEST is never sent, down to 5. CPU_NOP and CPU_RESCHEDULE are the
same other than debug statements, down to 4. So by taking 3 additional
CPU interrupts, we can eliminate the spinlock entirely.
We could do away with RESCHEDULE if we pass a nop function to CALL_FUNC.
I don't know if we would suffer a performance hit from doing that
though.
We could also only enable CPU_STOP if CPU_HOTPLUG was set. And
fold CPU_START/CPU_STOP into the CALL_FUNC bucket. Or deregister
CPU_START after the CPU's come up.
In any case, I think this is a whole lot preferable to the spinlock that
we're currently using. I have some other ideas (like using set_bit()
and xchg() which would take the atomic_hash_spinlock), but I think
redoing our IPI support in the way I've outlined above is cleaner.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
prev parent reply other threads:[~2006-11-26 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-25 16:53 [parisc-linux] [PATCH] Remove spinlock_t from cpu_data (and thus from processor.h) Kyle McMartin
2006-11-26 7:33 ` Grant Grundler
2006-11-26 18:37 ` Kyle McMartin
2006-11-26 18:56 ` Grant Grundler
2006-11-26 18:38 ` Matthew Wilcox [this message]
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=20061126183832.GK14076@parisc-linux.org \
--to=matthew@wil.cx \
--cc=kyle@parisc-linux.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox