From: "David S. Miller" <davem@redhat.com>
To: rusty@rustcorp.com.au
Cc: kuznet@ms2.inr.ac.ru, shemminger@osdl.org, netdev@oss.sgi.com,
acme@conectiva.com.br
Subject: Re: dev->destructor
Date: Fri, 02 May 2003 20:46:28 -0700 (PDT) [thread overview]
Message-ID: <20030502.204628.35664814.davem@redhat.com> (raw)
In-Reply-To: <20030503040949.804182C003@lists.samba.org>
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Sat, 03 May 2003 14:07:41 +1000
I imagined schemes where the kernel would be basically stopped during
module remove, so the half-remove and unremove would appear atomic.
I shied away from implementing such a monster without deadlock, but it
might be possible. Then we would truly have nirvana 8)
I think this is an interesting area for exploration.
This isn't a unique requirement BTW Rusty. IP conntrack rehashing
in the presence of RCU would want something just like this now
wouldn't it? Consider other applications, such as hot plug memory.
I'm sure tons of other interesting examples could be imagined.
So indeed, the key to nirvana would indeed be here :-)
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.
Once the master cpu sees all non-local-cpu bits set in the bitmask,
it begins the unload sequence, after the unload the cpu mask is
cleared and this signals the freeze threads to break from their spin
loops and schedule().
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.
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.
Do you see? Maybe... it is nearly Nirvana! :-)))))
Our ability to implement this changes the rest of the conversation,
so let us resolve this first.
next prev parent reply other threads:[~2003-05-03 3:46 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 ` David S. Miller [this message]
2003-05-05 5:18 ` dev->destructor Rusty Russell
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=20030502.204628.35664814.davem@redhat.com \
--to=davem@redhat.com \
--cc=acme@conectiva.com.br \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=rusty@rustcorp.com.au \
--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 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).