From: Andrew Morton <akpm@digeo.com>
To: george anzinger <george@mvista.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH]Timer list init is done AFTER use
Date: Fri, 20 Dec 2002 02:26:59 -0800 [thread overview]
Message-ID: <3E02F073.BF57207C@digeo.com> (raw)
In-Reply-To: 3E02D81F.13A5A59D@mvista.com
george anzinger wrote:
>
> On SMP systems the timer list init is done by way of a
> cpu_notifier call. This has two problems:
>
> 1.) Timers are started WAY before the cpu_notifier call
> chain is executed. In particular the console blanking timer
> is deleted and inserted every time printk() is called. That
> this does not fail is only because the kernel has yet to
> protect location zero.
But init_timers() directly calls timer_cpu_notify(), which directly
calls init_timers_cpu().
So your patch appears to be a no-op for the boot CPU.
> 2.) This notifier is called when a cpu comes up. I suspect
> that initializing the timer list when a hot swap of a cpu is
> done is NOT the right thing to do. In any case, if this is
> a desired action, the list still needs to be initialized
> prior to its use.
It should be OK as-is? The CPU_UP_PREPARE callout is performed
before the secondary starts doing things. Its timers are initialised.
> The attached patch initializes all the timer lists at
> init_timers time and does not put code in the notify list.
But the patch assumes that the per-cpu data exists for all CPUs - even
the !cpu_possible() ones.
This is true at present. But the intent here is that the per-cpu
storage be allocated as the CPUs come up, and in their node-local
memory. That saves memory and presumably having the cpu-local timers
in the cpu-local memory is a good thing.
I have working code which did all that, but it sort-of got lost
because there was a lot going on at the time.
Have you actually observed any problem?
next prev parent reply other threads:[~2002-12-20 10:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 8:43 [PATCH]Timer list init is done AFTER use george anzinger
2002-12-20 10:26 ` Andrew Morton [this message]
2002-12-20 17:18 ` george anzinger
2002-12-20 19:34 ` Andrew Morton
2002-12-20 20:01 ` george anzinger
2002-12-20 20:31 ` Andrew Morton
2002-12-22 8:38 ` Andrew Morton
2002-12-22 9:58 ` george anzinger
2002-12-22 21:14 ` Martin J. Bligh
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=3E02F073.BF57207C@digeo.com \
--to=akpm@digeo.com \
--cc=george@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).