From: Patrick Kilian <petschge@gmx.de>
To: BlaisorBlade <blaisorblade_spam@yahoo.it>,
user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: [uml-user] UNIX socket networking
Date: Sun, 29 Feb 2004 18:13:09 +0100 [thread overview]
Message-ID: <200402291813.09174.petschge@gmx.de> (raw)
In-Reply-To: <200402291720.12216.blaisorblade_spam@yahoo.it>
Hi all,
>> Problem 1.) How do I shutdown a kernel thread when the uml goes
>> down? At the moment my patched kernle gets stuck with 100% CPU
>> usage when I trie to shut down the uml kernel.
> Possibly can be done either through exitcall or uml_exitcall. Give a
> look at the arch/um/kernel/sigio_*.c, especially at sigio_cleanup,
> which is an UML exitcall. Note however that the thread it refers to
> exists only on the host; it could be your case or not.
I did some test with exitcall but it didn't work out. Looks like I was
trying to do the roght thing, but did some mistakes.
>> Problem 2.) How can I make sure that my kernel thread I startet
>> _after_ the networking stuff is inited? At the moment I start the
>> kernel thread with a __initcall and just do a sleep(30) in the
>> thread.
> The proper way would be to use late_initcall instead of __initcall
> (check in <linux/init.h>), supposing that network does not already
> use late_initcall.
I didn't know about late_initcall, but it sounds promising.
> Or you can just hack the network initcall and make it call your
> function; or your initcall can call the network init.
I wanted to avoid hacking the network code itself.
> In this case, to avoid double initialization, add at the start of
> network_init (or how is it called) something like:
>
> if (network_already_inited)
> return (Ok?);
> network_already_inited = 1;
>
> and before, in the same file:
> static int network_already_inited = 0;
>
> However rename the flag or someone could think you are a Pascal
> programmer (actually, I was). Seems like the actual function is
> called sock_init.
Well, I'll give it a try.
> Also, in 2.6 (what I am checking) initcalls are called after sock_init
> (in init/main.c: do_basic_setup()). So if that is right you do not
> need anything to make sure that your initcall is after network
> initialized.
The first time I ran into this problem was on 2.4.*. But I tried IIRC on
2.6.* too and had the same problems.
>> Problem 3.) I can only create sockets in the "anonymous" namespace.
>> The normal namespace gives me some error which I don't rememeber
>> right now but I could find out what th errorcode was.
> Sorry, but I cannot find any "anonymous" namespace. What is it? Maybe
> PF_UNSPEC?
It's abstract namespace (sorry for my mistake):
It's also in PF_LOCAL but with names that start with \0. I was told to
try this on the linux kernel newbies list. If you google with my name
and socket you should be able to find that thread.
> I guess the "normal" namespace is PF_LOCAL.
IIRC yes.
>> So if somebody could help me with this problem I'd be willing to
>> put some more work into this. Or I could post my tried on this list
>> or by pm
> There has been a lot of request for a such feature, so I would like
> if you can post it here or rather on uml-devel (especially to avoid
> anyone trying it without specific knowledge), even if it is not
> complete. So we could better help you. Also, state whether it is onto
> 2.4 or 2.6.
It's just some basic test. Far from being a working patch. I'll try your
sugestions and send in a patch in the next few days.
Thanks for your help,
Patrick "Petschge" Kilian
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next parent reply other threads:[~2004-02-29 17:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200402290158.54770.jdizzl@xs4all.nl>
[not found] ` <20040229120513.934193BCB7@home.petschge.de>
[not found] ` <200402291720.12216.blaisorblade_spam@yahoo.it>
2004-02-29 17:13 ` Patrick Kilian [this message]
2004-03-01 20:14 ` [uml-devel] Re: [uml-user] UNIX socket networking Patrick "Petschge" Kilian
2004-03-02 18:09 ` BlaisorBlade
2004-03-02 21:40 ` Patrick Kilian
2004-03-07 10:54 ` Patrick "Petschge" Kilian
2004-03-08 21:33 ` Jeff Dike
2004-03-07 11:28 ` BlaisorBlade
2004-03-07 11:56 ` Patrick Kilian
2004-03-07 12:12 ` BlaisorBlade
2004-03-07 13:06 ` [uml-devel] " Patrick Kilian
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=200402291813.09174.petschge@gmx.de \
--to=petschge@gmx.de \
--cc=blaisorblade_spam@yahoo.it \
--cc=petschge@web.de \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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