Linux-Development-Sys Digest #916, Volume #7 Mon, 29 May 00 20:13:21 EDT
Contents:
Re: Poor performance of IPC on SMP machine ! (John Gluck)
Re: Poor performance of IPC on SMP machine ! (David Welch)
Re: kernel documentation, memory management, kmalloc, mmap. (Villy Kruse)
Re: going kernel 2.0->2.2: insmod stops working (John Gluck)
Re: Very simple linux Scheduler question (John Gluck)
Re: kernel documentation, memory management, kmalloc, mmap. (Emmanuel Dreyfus)
Re: comparing passwords ("Frank")
Re: comparing passwords ("Frank")
Re: Technical advantages/disadvantages of Linux (Mario Klebsch)
Re: System integrity check (was Re: ps does not show all processes) (Mario Klebsch)
Re: ps does not show all processes ("Jackson C. Allen")
Re: Oops in interrupt handlers / idle task (Kaz Kylheku)
Re: oops messages and wait queue declaration (Kaz Kylheku)
Re: Boot Error: "kernel panic: No init found. Try Passing init= to kernel" ("Douglas
Kilpatrick")
URGENT PLEASE HELP! ("Timothy Farrell")
unresolved symbol ("Robichaud, Jean-Philippe [BAN:6S33:EXCH]")
Re: Technical advantages/disadvantages of Linux (p@t)
Re: unresolved symbol ([EMAIL PROTECTED])
Re: Winmodems )Re: Need ideas for university funded project for linux) (Victor
Wagner)
Re: unresolved symbol (Matthew Palmer)
----------------------------------------------------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: Poor performance of IPC on SMP machine !
Date: Mon, 29 May 2000 10:24:49 -0400
Your tests are interesting...
I wonder if you would like them tried on a Pentium III dual processor
with 256Meg RAM.
I have a 2.2.14 kernel and also a 2.4.0-test1 kernel to try them on.
BTW physically ripping out a processor is not necessary. Simply
recompile the kernel without SMP support.
Boczi wrote:
>
> I'm writiting my thesis, and one part concerns IPC performance on Linux.
>
> I wrote some tests. Classic ping-pong using pipes, message queues and my
> brand new QNX like message passing.
>
[snip]
> I ran my tests on 2.2.14 kernel with SMP support and the machine was dual
> Pentium 166 MMX with 64 MB of memory. No other processes.
> Anybody got ani idea, what is wrong?
>
> WHY DUAL CPU COMPUTER IS 2 TIMES SLOWER THAN SINGLE CPU ?????
>
> Best regards
>
> Boczi
> --
> Andrzej Boczek (boczi<at>pol.pl)
--
John Gluck (Passport Kernel Design Group)
(613) 765-8392 ESN 395-8392
Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.
------------------------------
From: David Welch <[EMAIL PROTECTED]>
Subject: Re: Poor performance of IPC on SMP machine !
Date: 29 May 2000 14:42:21 GMT
Boczi wrote
>
>WHY DUAL CPU COMPUTER IS 2 TIMES SLOWER THAN SINGLE CPU ?????
>
Two possibilities :-
1) On a multi-CPU system one of the processes is spending time spinning
on a lock in kernel-mode when on a uni-processor system it wouldn't be
running, so time is charged to the process when it isn't doing any work
2) The two processors are contending for a cache-line, maybe for the
internal kernel-buffer used to hold the IPC data.
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: kernel documentation, memory management, kmalloc, mmap.
Date: 29 May 2000 14:48:24 GMT
On Mon, 29 May 2000 13:41:38 +0200,
Emmanuel Dreyfus <[EMAIL PROTECTED]> wrote:
>Arnaud Westenberg <[EMAIL PROTECTED]> wrote:
>
>Thank you for the URL (kernel guide)
>
>> Yes thats correct, the kernel is linked to run in physical address
>> space.
>
>So what is the difference between /dev/mem and /dev/kmem for Linux?
>
Actualy the kernel is NOT run in physical address space but kernel
virtual address space which starts at 3 Gb or 0xC0000000. It
Check the file /usr/src/linux/Documentation/IO-mapping.txt
and while you are at it read the other files in that directory
as well.
Villy
------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: going kernel 2.0->2.2: insmod stops working
Date: Mon, 29 May 2000 10:41:21 -0400
zacals wrote:
>
> I hope you can help me.
> I've decided to post here because after 3 months posting on
> comp.os.linux.setup no one
> has bothered to look into it.
> ----- Original Message -----
> From: zacals <[EMAIL PROTECTED]>
> Newsgroups: comp.os.linux.setup
> Sent: Wednesday, May 24, 2000 6:39 PM
> Subject: Kernel 2.2: insmod seems to stop working
>
> > Hi "linuxeros":
> > I've tryed installing modules such as "sb" and "plip" put they report:
> > init_module:Device or resource busy
> > What has happened with modules from kernel 2.0 through 2.2?
> > and, where may I find some information?
> > Thanks.
> Thanks again
You most likely need to update your modutils.
If I remember correctly, the method of loading modules changed between
2.0.XX and 2.2.XX
There should be a changes file in the 2.2.XX source tree that will give
you the info you're looking for.
--
John Gluck (Passport Kernel Design Group)
(613) 765-8392 ESN 395-8392
Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.
------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: Very simple linux Scheduler question
Date: Mon, 29 May 2000 10:45:47 -0400
Jason Johnson wrote:
>
> Hello,
>
> I have question about the linux scheduler. I have been looking
> through the source code, and as far as I can tell
> it looks like, that each process has only a certain
> amount of ticks it is allowed to run. When it runs out, it will not be
> scheduled again until all other runable processes have also
> used all of there ticks, at which point all the runable processes
> have there quantums recalculated and the whole thing starts over.
> Am I correct here (I am obviously ignoring processes that do IO,
> or get put to sleep in general)?
>
> Thanks in advance for indulging my curiosity.
>
> Jason
That's one scheduling mechanism but there are a few others available...
The April 2000 issue of Linux Journal has an article that may interest
you.
--
John Gluck (Passport Kernel Design Group)
(613) 765-8392 ESN 395-8392
Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.
------------------------------
From: [EMAIL PROTECTED] (Emmanuel Dreyfus)
Subject: Re: kernel documentation, memory management, kmalloc, mmap.
Date: Mon, 29 May 2000 17:17:36 +0200
Villy Kruse <[EMAIL PROTECTED]> wrote:
> Check the file /usr/src/linux/Documentation/IO-mapping.txt
> and while you are at it read the other files in that directory
> as well.
Let's try to describe the big picture. Please tell me where I'm wrong.
1) What my PCI device sees is not the physical address but the bus
address (which is the same on x86 but might be different on other
plateforms)
2) When running in kernel mode, the CPU sees the memory as it is
physically, but translated to 0xc0000000. To get a bus address from a
kernel virtual address, I should use virt_to_bus (this macro will just
untraslate the address from 0xc0000000)
3) To get a bus address from a user virtual address, I should walk
through the pgd/pmd/pte stuff, and then do a virt_to_bus on it. I must
be in kernel mode to do that, and I must have mlock()'ed the page to
ensure they are not swapped.
4) /dev/mem is physical memory, and /dev/kmem is kernel virtual memory.
That means that I will at offset 0xc0000000 of /dev/kmem what is at
offset 0x00000000 of /dev/mem.
--
Emmanuel Dreyfus
[EMAIL PROTECTED]
------------------------------
From: "Frank" <[EMAIL PROTECTED]>
Subject: Re: comparing passwords
Date: Mon, 29 May 2000 16:02:04 GMT
Philip <[EMAIL PROTECTED]>...
^
^ Ok.. I already took a look at su.c (sh-utils) and indeed it's being done
^ that way. But how do I get the shadow password ? Or how do I detect if a
^ system uses shadowed passwords or not ?
See /usr/doc/Linux-HOWTOs/Shadow-Password-HOWTO and search for "8. Adding
shadow support to a C program" (two spaces between "8." and "Adding").
Frank
------------------------------
From: "Frank" <[EMAIL PROTECTED]>
Subject: Re: comparing passwords
Date: Mon, 29 May 2000 16:04:46 GMT
Philip <[EMAIL PROTECTED]>...
^
^ Ok.. I already took a look at su.c (sh-utils) and indeed it's being done
^ that way. But how do I get the shadow password ? Or how do I detect if a
^ system uses shadowed passwords or not ?
^
In addition to my last, the same HOWTO may be under /usr/doc/shadow-????????
Frank
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: Technical advantages/disadvantages of Linux
Date: Mon, 29 May 2000 18:56:27 +0200
Josef Moellers <[EMAIL PROTECTED]> writes:
>I was asked to present a paper on the technical advantages and
>disadvantages of Linux (compared to other Unices). Is there a website
>that I could tap for information?
If you ask for technical reasons, IMHO linux is as good as any other
UNIX system. The main advantage of linux is the availability of the
source, which hardly can be called a technical reason.
Of course, there are lots of details, where linux differs from other
UNIX systems, on some details, linux is superoir, and on other
details, other UNIXes are. But this really are details.
When comparing these details, you often end in also comparing the
hardware. UNIX on a Sun Sparc system e.g. does have a powerful system
rom, which offers a wide variety of boot options and helps the UNIX
system for debugging purposes. But this is not an advantage of
Solaris, but of the different hardware used.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: System integrity check (was Re: ps does not show all processes)
Date: Mon, 29 May 2000 19:21:47 +0200
Josef Moellers <[EMAIL PROTECTED]> writes:
>Since you mention this ... is there a 100% secure method of checking the
>integrity of a set of installed files?
>I mean: even given the algorithm and a sample installation, a cracker
>cannot hide his presence?
Signing them like PGP does. However, signing must be done, so that the
resultingh file still is executable.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
------------------------------
From: "Jackson C. Allen" <[EMAIL PROTECTED]>
Subject: Re: ps does not show all processes
Date: Mon, 29 May 2000 18:28:46 GMT
As I said I can find the sendmail process in /proc.
Stefan Taferner wrote:
>
> "Jackson C. Allen" <[EMAIL PROTECTED]> writes:
>
> > I RTFM again an tried "ps aux" as root and other logins. It still does
> > not display anything about sendmail and some other processes I know are
> > running. I can find the hidden process in /proc.
>
> You are sure that sendmail et al isn't run via inetd on your system ?
>
> -- Stefan
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Oops in interrupt handlers / idle task
Reply-To: [EMAIL PROTECTED]
Date: Mon, 29 May 2000 19:45:08 GMT
On Wed, 24 May 2000 09:28:39 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>This works for usermode processes that fault in-kernel, as you retain
>use of the shell, but when my interrupt handler or its bottom half
>faults, nothing is recorded to syslogd, the kernel panics (although my
>interrupt handler may still be invoked it seems) and obviously you lose
>the shell.
>
>Is it time for pen, paper and patience?
Or a serial console with session capture.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: oops messages and wait queue declaration
Reply-To: [EMAIL PROTECTED]
Date: Mon, 29 May 2000 19:51:13 GMT
On Sat, 27 May 2000 18:45:28 +0200, Arnaud Westenberg <[EMAIL PROTECTED]> wrote:
[ please don't post MIME encoded messages with attachments to discussion
groups ]
>typedef struct list_entry * ptr_to_list_entry;
>struct list_entry {
> unsigned long data;
> struct wait_queue *wq;
> ptr_to_list_entry next;
>};
>
>In read.c
>ssize_t read(struct file *file, char *buffer, size_t length, loff_t
>*offset)
>{
> ptr_to_list_entry new_entry;
>
> new_entry=(ptr_to_list_entry)kmalloc(sizeof(struct
>list_entry),GFP_KERNEL);
> /* I assume sizeof(struct list_entry) doesn't result in what I hoped
>for */
>
> /* Some code to set up the linked list */
What about ``some code to set up the wait queue?'' How did you initialize
the wq member of the structure by calling init_waitqueue(&new_entry->wq) ?
Also, did you protect your linked list insertion and deletion with a spinlock
or semaphore?
--
#exclude <windows.h>
------------------------------
From: "Douglas Kilpatrick" <[EMAIL PROTECTED]>
Subject: Re: Boot Error: "kernel panic: No init found. Try Passing init= to kernel"
Date: Mon, 29 May 2000 15:47:48 -0500
In article <8gp872$rbr$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dr H. T.
Leung) wrote:
>
> Strange. Maybe it wants init to be in /usr/sbin or /usr/bin or /bin . I
> would try a few things:
With the copy of 2.2.14 I have, it tries to run the following, in order
/sbin/init
/etc/init
/bin/init
/bin/sh
If init is in one of those directories, I'd think that you passed the wrong
partition in as the root partition.
Doug
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
------------------------------
From: "Timothy Farrell" <[EMAIL PROTECTED]>
Subject: URGENT PLEASE HELP!
Date: Mon, 29 May 2000 22:19:21 +0200
Hi,
I am in urgent need for help. I think I just scratch Netscape and
I have no idea how to restart it. I work from a PC, but
I can't just unplug the plug as postmaster is running on the server,
and I don't have the rights to launch it back on if I hit the switch!!!
When I try typing linux>netscape I get the following message: IOT
trap/Abort
PLEASE HELP!!!!!
Thanks so much.
------------------------------
From: "Robichaud, Jean-Philippe [BAN:6S33:EXCH]" <[EMAIL PROTECTED]>
Subject: unresolved symbol
Date: Tue, 30 May 2000 04:05:07 -0400
Hi,
I just type an example from Linux kernel module programming guide who
is a replacement for the "printk" function. I include the <string.h>
file and I use the function strlen(str) in the function. When I
complile, everything is find. When I do insmod module.o, I get:
module.o : unresolved symbol strlen
Can someone tell me how to get over this !!!!
Thanks
--
Jean-Philippe Robichaud
[EMAIL PROTECTED]
(514) 818-7750
St-Laurent, Quebec, Canada
------------------------------
From: p@t
Subject: Re: Technical advantages/disadvantages of Linux
Date: 29 May 2000 13:07:46 -0700
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
>If you ask for technical reasons, IMHO linux is as good as any other
>UNIX system.
That is not the engineering way to compare products.
To start with, you need to come up with a list of the functionalities
that Linux provides, and do the same for the OS's you are trying
to compare it with.
For example, SMP, clustering, file system functionalities, device support,
support for large files, USB, etc..
There are a number of ways to compare and contrast OS's.
p
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: unresolved symbol
Date: 29 May 2000 15:01:57 -0700
In article <[EMAIL PROTECTED]>, "Robichaud, says...
>When I
>complile, everything is find. When I do insmod module.o, I get:
>module.o : unresolved symbol strlen
>
>Can someone tell me how to get over this !!!!
>
C run-time library is not linked into the kernel. The kernel
does NOT use libc.
Nasser
------------------------------
From: [EMAIL PROTECTED] (Victor Wagner)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Winmodems )Re: Need ideas for university funded project for linux)
Date: 29 May 2000 08:57:06 +0400
In comp.os.linux.misc [EMAIL PROTECTED] wrote:
: [EMAIL PROTECTED] (Victor Wagner) writes:
:> Reasonable?! Internal modem is next worst thing to winmodem.
: But on the plus side, they don't require the purchase of a separate
: serial card for high-speed communication. And they don't take up more
: space, need a serial cable, or another power line.
Never needed one. Build-in serial ports on modern motherboards are
usiall good enough.
: Dunno. It's never happened to me. I can't imagine it's because our
: phone lines are better, because they're so bad that it's easier to
: replace them than fix them. Maybe our modems are better-designed?
I think that modems are same all over the world, but you've probably
never happened to depend on telephone switch station, which was build in
early 50's.
: Problem is, serial ports are almost as overused as parallel ports. I
: can think of five devices off the top of my head - still being made,
: by the way - that require a serial port. Hopefully these problems
: will be solved by USB, but I'm not holding my breath.
Yes. I'm already thinking of getting multiport card. If I give up my
6-year old serial mouse, I would be able to go without, but I'm afraid
that modern PS/2 mouse woundn't work for more than couple of years.
:> Only thing that I don't like about external modem is that they require
:> something other than 5V DC or 12V DC. (typically 12V AC). If they need
:> some voltage, which I could get from the main power supply of machine,
:> I'd be able to get rid of those power supply units.
: You mean the transformers? Granted, they are annoying, but - over
: here, at least - there's no 5/12VDC power jack on the outside of our
: computers. So we wouldn't have anyplace to plug the modem in.
But you have various connectors inside case - for hard disks and so on.
Have ever seen how indicators on front panel or 486's coolers are
connected to them? Solder a long cable to such a device (female and
male connectors connected with 5cm of cable) and you only need to find a
hole in case to lead this cable outside.
Once I've used a hole for AT keyboard connector, and cables which
powered my Zip drive and scanner happily coexisted with keyboard itself.
: [drivers etc]
Photographing a volcano is just about the most miserable thing you can do.
-- Robert B. Goodman
[Who has clearly never tried to use a PDP-10. Ed.]
------------------------------
From: [EMAIL PROTECTED] (Matthew Palmer)
Subject: Re: unresolved symbol
Reply-To: [EMAIL PROTECTED]
Date: 30 May 2000 06:50:23 +1000
Robichaud, Jean-Philippe [BAN:6S33:EXCH] is of the opinion:
> I just type an example from Linux kernel module programming guide who
>is a replacement for the "printk" function. I include the <string.h>
>file and I use the function strlen(str) in the function. When I
>complile, everything is find. When I do insmod module.o, I get:
>module.o : unresolved symbol strlen
>
>Can someone tell me how to get over this !!!!
Don't use strlen(). If you must use it, reimplement it. If you can't
(huh?) grab the appropriate bit of code from libc.a and link that with your
program before you try to insmod it.
--
=======================================================================
#include <disclaimer.h>
Matthew Palmer
[EMAIL PROTECTED]
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************