From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: adeos-main@gna.org
Subject: Re: [Adeos-main] [PATCH+HACK] optimise root stalling
Date: Thu, 28 Sep 2006 12:31:57 +0200 [thread overview]
Message-ID: <451BA49D.2030303@domain.hid> (raw)
In-Reply-To: <1159438034.4949.25.camel@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1828 bytes --]
Philippe Gerum wrote:
> On Thu, 2006-09-28 at 11:23 +0200, Jan Kiszka wrote:
>> Philippe Gerum wrote:
>>> On Thu, 2006-09-28 at 11:15 +0200, Jan Kiszka wrote:
>>>> Philippe Gerum wrote:
>>>>> On Mon, 2006-09-25 at 09:35 +0200, Jan Kiszka wrote:
>>>>>
>>>>> This one won't work. We need to forcibly re-enable the hw IRQs upon root
>>>>> unstall requests, regardless of the fact that interrupts are pending in
>>>>> the log; some code rely on this. E.g. Adeos/ppc over 2.4 would remain
>>>>> stuck in the delay calibration routine, but there are other more tricky
>>>>> places where this would bite too.
>>>> But this would be ok?
>>>>
>>>> #else /* !CONFIG_SMP */
>>>> __clear_bit(IPIPE_STALL_FLAG,
>>>> &ipipe_root_domain->cpudata[cpuid].status);
>>>>
>>>> if (unlikely(ipipe_root_domain->cpudata[cpuid].irq_pending_hi !=
>>>> 0)) {
>>>> local_irq_disable_hw();
>>>> __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY);
>>>> }
>>>> local_irq_enable_hw();
>>>> #endif /* CONFIG_SMP */
>>>>
>>>> So we can still save one disable IRQ in the fastpath.
>>>>
>>> But in such a case, you would have to use clear_bit() to keep atomicity.
>> This is for UP, not SMP.
>>
>
> This is not a UP vs SMP issue, the stall bit is strictly CPU local
> anyway. The issue is that some archs do _not_ have intrinsically atomic
> bitops; they need to emulate them by masking interrupts around the bit
> setting operation. Using __clear_bit() in this context would make this
> code preemptible by an interrupt in the middle of the bitop. Disabling
> hw IRQs on entry allows us to use non-atomic bitops.
Yeah, I meanwhile realised my x86-restricted view as well. :)
Does it still make sense then to optimise like I proposed?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-09-28 10:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 7:35 [Adeos-main] [PATCH+HACK] optimise root stalling Jan Kiszka
2006-09-25 10:44 ` Jan Kiszka
2006-09-28 15:33 ` Philippe Gerum
2006-09-28 9:07 ` Philippe Gerum
2006-09-28 9:15 ` Jan Kiszka
2006-09-28 9:16 ` Philippe Gerum
2006-09-28 9:23 ` Jan Kiszka
2006-09-28 10:07 ` Philippe Gerum
2006-09-28 10:31 ` Jan Kiszka [this message]
2006-09-28 10:46 ` Philippe Gerum
2006-09-29 7:48 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2006-09-26 15:07 gilles.chanteperdrix
2006-09-26 15:14 ` Jan Kiszka
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=451BA49D.2030303@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=adeos-main@gna.org \
--cc=rpm@xenomai.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.