From: Rusty Russell <rusty@rustcorp.com.au>
To: "David S. Miller" <davem@redhat.com>
Cc: kuznet@ms2.inr.ac.ru, shemminger@osdl.org, netdev@oss.sgi.com,
acme@conectiva.com.br
Subject: Re: dev->destructor
Date: Mon, 05 May 2003 15:18:29 +1000 [thread overview]
Message-ID: <20030505051854.5C31F2C05E@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 02 May 2003 20:46:28 MST." <20030502.204628.35664814.davem@redhat.com>
In message <20030502.204628.35664814.davem@redhat.com> you write:
> I think it can work Rusty, in short you create 1 freeze thread
> per cpu. You wake up all the freeze threads on non-local cpus,
> and they indicate their presence via some bitmask.
This code is already in module.c. I'm glad you like it though 8).
But we disable local irqs as well: this is what I call a "bogolock"
(the read-side of a bogolock is prempt_disable()/preempt_enable(): you
could temporarily disable preemption and force the scheduler to run
every preempted thread, and remove this).
> This means the local master cpu executes the unload sequence. It may
> sleep in order to yield to, for example, semaphore holders, it may
> also sleep to yield to kswapd and friends for the sake of memory
> allocation. I mean... consider all the situations and please try to
> find some hole in this. We can make all try_to_*() sleep at this
> time too... this in particular needs more thought.
Well, it's a big task. Holding interrupts disabled for unbounded time
on CPUs needs to be thought about, but I think can be fixed. try_xxx
can be called from interrupt context: you really want to get rid of
interrupts, too...
During previous discussions, I called this "return to primordial
soup": back to like during init. Ideally, only userspace context (no
interrupts, timers, bottom halves), and life is easy.
> To make these freeze threads globally useful, we allow them to
> run atomicity commands. The two defined commands are "local_irq_*()"
> and "local_bh_*()", two bitmasks control this and the freeze threads
> check the bits in their spin loops.
Something like this?
/* Tell all freeze threads to disable bottom halves. */
void global_bh_disable(void);
void global_bh_enable(void);
/* Tell all freeze threads to disable interrupts halves. */
void global_irq_disable(void);
void global_irq_enable(void);
> Do you see? Maybe... it is nearly Nirvana! :-)))))
Yes, but I worry it might be an illusion 8)
> Our ability to implement this changes the rest of the conversation,
> so let us resolve this first.
Yes, but it's a big IF. I think it might be easier to make all
unregistrations runnable in interrupt context 8(
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2003-05-05 5:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-30 6:26 dev->destructor David S. Miller
2003-04-30 16:33 ` dev->destructor Stephen Hemminger
2003-05-01 1:10 ` dev->destructor kuznet
2003-05-01 7:00 ` dev->destructor David S. Miller
2003-05-01 12:01 ` dev->destructor Rusty Russell
2003-05-01 11:09 ` dev->destructor David S. Miller
2003-05-01 17:51 ` dev->destructor Arnaldo Carvalho de Melo
2003-05-01 16:55 ` dev->destructor David S. Miller
2003-05-01 17:28 ` dev->destructor Arnaldo Carvalho de Melo
2003-05-02 4:06 ` dev->destructor kuznet
2003-05-02 5:25 ` dev->destructor Rusty Russell
2003-05-02 20:48 ` dev->destructor David S. Miller
2003-05-03 4:07 ` dev->destructor Rusty Russell
2003-05-03 3:46 ` dev->destructor David S. Miller
2003-05-05 5:18 ` Rusty Russell [this message]
2003-05-03 4:00 ` dev->destructor David S. Miller
2003-05-05 16:08 ` dev->destructor Stephen Hemminger
2003-05-06 14:25 ` dev->destructor David S. Miller
2003-05-07 2:54 ` dev->destructor Rusty Russell
2003-05-05 20:00 ` dev->destructor Stephen Hemminger
2003-05-06 4:18 ` dev->destructor Rusty Russell
2003-05-06 14:23 ` dev->destructor David S. Miller
2003-05-06 22:32 ` [PATCH 2.5.69] IPV4 should use dev_hold Stephen Hemminger
2003-05-07 7:32 ` David S. Miller
2003-05-07 2:50 ` dev->destructor Rusty Russell
2003-05-07 3:58 ` dev->destructor David S. Miller
2003-05-06 22:35 ` dev->destructor Stephen Hemminger
2003-05-06 23:51 ` [RFC] Experiment with dev and module ref counts Stephen Hemminger
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=20030505051854.5C31F2C05E@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=acme@conectiva.com.br \
--cc=davem@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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.