Linux-Development-Sys Digest #755, Volume #8 Mon, 28 May 01 17:13:13 EDT
Contents:
Re: Debug kernel (cLIeNUX user)
Re: fast disk writes (cLIeNUX user)
Device Driver Interrupts on SMP using kernel 2.4 (Hilik Stein)
SIGALRM - Please help!! (^CooL^)
Re: what does the prefix "__" mean (yingyi)
Re: SIGALRM - Please help!! (Joe Leherbauer)
Re: linux smp/RT development question. (Klaas-Henning)
Re: fast disk writes (Alexander Viro)
Re: what does the prefix "__" mean (Christopher Fairbairn)
booting problem (prakash)
Porting Linux to a new arch (Fotis Andritsopoulos)
Re: Debug kernel (Tahar)
Re: Debug kernel (Massimiliano Caovilla)
Re: Did not find COAS?? (Massimiliano Caovilla)
F11 and F12 can't be tested within a java application (A. GUILLEVIC)
Re: Did not find COAS?? (Bob Hauck)
hash function for ip address (les ander)
Re: fast disk writes (cLIeNUX user)
Re: g++ => byte alignment (Nix)
Re: is there a way to password protect LILO? (John in SD)
Re: hash function for ip address (Paul Repacholi)
----------------------------------------------------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: Debug kernel
Date: Mon, 28 May 2001 07:08:20 -0000
[EMAIL PROTECTED]
>M.C. enicon <[EMAIL PROTECTED]> wrote in message
>news:9erofe$kfq$[EMAIL PROTECTED]...
>>
>> Zhiyong Xu <[EMAIL PROTECTED]> wrote in message
>> [EMAIL PROTECTED]
>> > Hi,
>> > How can I debug a testing kernel...
>>
>> Hi,
>> I've been asking this question for months. The final answer is: maybe,
>> but there is not an "official" way.
>> There is NO kernel debugger such as solaris adb, but
>> there are some kernel patches that let you do something like that.
>> kdb is a debugger included in the kernel that is triggered by Oops an the
>> break key,
>
> There are some debugging techniques and debuggers designed for Real-Time
>Linux that are supposed to allow debugging RT modules which I believe also
>allow debugging non-RT modules in the kernel too. You might want to take a
>look at what they have.
> http://www.rtlinux.com
> http://www.rtlinux.org
>
>
> Norm
>
>
I have installed my Forth-like language as a kernel daemon. I'm not sure
what it's debugging potential is, but it's an extensible interpreter
running in kernelspace.
ftp://linux01.gwdg.de/pub/cLIeNUX/interim
or email me. I've also posted a description of this to comp.lang.forth.
I haven't put the H3sm side of it up on the ftp site, pending interest.
Rick Hohensee
www.clienux.com
------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: fast disk writes
Date: Mon, 28 May 2001 07:12:15 -0000
[EMAIL PROTECTED]
>In article <[EMAIL PROTECTED]>,
>Karl Heyes <[EMAIL PROTECTED]> wrote:
>
>>Nope. fwrite is a library call wrapped around write which is a syscall.
>>256MB is one hell of a write buffer, with multiple calls you'll be hitting
>
>... so win from the submitting the data in block-aligned chunks is pretty
>much noise.
>
>>the memory system hard, but it would be tied to disk speed in the end.
>>
>>As far as I know ext2 is not based on FFS
>
>It certainly is. Take descriptions and compare.
Al, really? FFS has fragment blocks, all that BSD rotation sync BS, big
blocks...
I'm betting ext2 is based on minix, the One True Generic-ass Unix
Filesystem.
Rick Hohensee
:; cLIeNUX /dev/tty12 02:53:22 /
:;l -d */
Cintpos/ boot/ device/ incoming/ owner/ temp/
Debian/ command/ floppy/ log/ source/
Linux/ configure/ guest/ lost+found/ subroutine/
NetBSD/ dev/ help/ mounts/ suite/
:; cLIeNUX /dev/tty12 02:53:30 /
:;
>
>--
>"You're one of those condescending Unix computer users!"
>"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: Hilik Stein <[EMAIL PROTECTED]>
Subject: Device Driver Interrupts on SMP using kernel 2.4
Date: Sun, 27 May 2001 13:07:46 +0100
Hi all
I am trying to write/modify a NIC device driver for a high-speed lan
card. the device generates a huge a number of H.W. interrupts.
i wanted to switch to SMP machine and force the kernel to run the
hardware interrupts on one CPU only. is this possible ? how can it be
done ?
10x
Hilik
------------------------------
From: [EMAIL PROTECTED] (^CooL^)
Subject: SIGALRM - Please help!!
Date: 28 May 2001 01:18:42 -0700
Hi everyone.
I am working on a POSIX-like user-level thread library that does not
rely on the
underlying kernel system calls to switch context between threads, etc,
making it a faster solution than kernel-level threads. I am using GNU
C on Red Hat Linux 7.
Now first of all, I know there is POSIX that already does all that,
but I need this for a university project - so I can't just use POSIX!
:-)
Anyway, I need to use SIGALRM to implement pre-emptive
multi-tasking....
Every a pre-stipulated pre-emption interval, a thread is interrupted
and is forced to yield.... I am using signam (SIGALRM, sig_handler) so
that everytime the interrupt is generated, the function sig_handler
calls the thread's yield() function automatically.
Now the problem is that the yield() function performs a longjmp which
does not return, and therefore the interrupt handling does not return
either! For this reason, it seems that once the interrupt occurs a
first time, it does not occur anymore times after that - sort of
locks!
Here's more or less what I'm talking about:
void sig_handler (int arg) {
yield();
}
void yield () {
// Scheduling operations such as setjmp go here...
// Re-schedule another interrupt
signal (SIGALRM, sig_handler);
value.it_value.tv_usec = preempt_interval;
setitimer(ITIMER_REAL,&value,&value2);
// Switch context
longjmp (...); // This call does not return
}
int main () {
// Schedule first interrupt
signal (SIGALRM, sig_handler);
value.it_value.tv_usec=1000000;
setitimer(ITIMER_REAL,&value,&ovalue);
// start running first thread.
setjmp (..);
(longjmp (...);
}
Got the idea now? It does work well the first time... In fact, the
first running thread IS interrupted and the first context switch
occurs, BUT after that no other interrupt is generated, and the second
running thread will run forever unless it voluntarily yields!
Anyone has any idea how I could solve this problem?
Regards and thanks,
Clyde.
------------------------------
From: [EMAIL PROTECTED] (yingyi)
Subject: Re: what does the prefix "__" mean
Date: 28 May 2001 01:33:49 -0700
Thanks!
actually i'm looking at the schedule_tail function in sched.c, this
function just call the __schedule_tail function, which is defined in
the same file. the only difference is __schedule_tail is defined as
static. Why make much a differenciation?
yingyi
Christopher Fairbairn <[EMAIL PROTECTED]> wrote in message
news:<9esmas$o2u$[EMAIL PROTECTED]>...
> Hi,
>
> yingyi wrote:
> > some functions in the kernel source has a prefix "__". anynoe can tell me
> > what this prefix means? Thanks!
>
> Where about excatly? Can you be more specific, for example are these
> prefixes you see linking to assembly code etc....
>
> Usually its used for low level functions which the main source doesn't
> really need to use.
>
> For example read calls _read etc... where _read has a platform dependant
> implementation...
>
> Christopher Fairbairn.
------------------------------
From: [EMAIL PROTECTED] (Joe Leherbauer)
Subject: Re: SIGALRM - Please help!!
Date: 28 May 2001 08:36:40 GMT
[EMAIL PROTECTED] (^CooL^) wrote:
>
> Anyway, I need to use SIGALRM to implement pre-emptive
> multi-tasking....
> Every a pre-stipulated pre-emption interval, a thread is interrupted
> and is forced to yield.... I am using signal (SIGALRM, sig_handler) so
> that everytime the interrupt is generated, the function sig_handler
> calls the thread's yield() function automatically.
>
> Now the problem is that the yield() function performs a longjmp which
> does not return, and therefore the interrupt handling does not return
> either! For this reason, it seems that once the interrupt occurs a
> first time, it does not occur anymore times after that - sort of
> locks!
man signal
will tell you why the handler is invoked only once.
Use sigaction() and companions.
---
Joe Leherbauer Leherbauer at telering dot at
Registered Linux user number 215803
"Somewhere something incredible is waiting to be known."
-- Isaac Asimov
------------------------------
From: Klaas-Henning <[EMAIL PROTECTED]>
Subject: Re: linux smp/RT development question.
Date: Mon, 28 May 2001 11:37:45 +0200
hi norm,
thanks for your answer. i looked at rtlinux before and it would definetly
solve the problem and using it will be one approach to implement a solution.
but to achieve a comparable solution by modifying the standard linux kernel
would give me the opportunity of using every linux system call (which is
included
in any -must have- rt-modifications).
in rtlinux it's not possible to use any linux system calls for rt purposes
and it would be neccessyry to reimplement everything and one isn't able
to use the great number of hardware and algorythms linux offers.
so perhaps there are ideas of which would basically to be modified to
achieve a linux behavior like in my question.
regards,
klaas
Norm Dresner schrieb:
>
> Using Real-Time Linux (RTL), you can easily create an interruptible task.
> Once it gains control of a CPU, the only possible thing that can dislodge it
> would be a higher-priority task. That should give you exactly what you
> want.
>
> http://www.rtlinux.org
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: fast disk writes
Date: 28 May 2001 06:43:07 -0400
In article <[EMAIL PROTECTED]>,
cLIeNUX user <r@cLIeNUX.> wrote:
>[EMAIL PROTECTED]
>Al, really? FFS has fragment blocks, all that BSD rotation sync BS, big
Really.
Read the papers on design of these beasts. BTW, modern FFS variants tend
to drop rotational latency optimizations - disks had changed. So ext2
is not alone at that.
>blocks...
>
>I'm betting ext2 is based on minix, the One True Generic-ass Unix
>Filesystem.
Thanks for the offer. What's your stake?
--
Barnum was right.
------------------------------
From: Christopher Fairbairn <[EMAIL PROTECTED]>
Subject: Re: what does the prefix "__" mean
Date: Mon, 28 May 2001 23:02:22 +1200
Hi,
yingyi wrote:
> actually i'm looking at the schedule_tail function in sched.c, this
> function just call the __schedule_tail function, which is defined in
> the same file. the only difference is __schedule_tail is defined as
> static. Why make much a differenciation?
I don't know in that case.....
Declaring something static "hides" it from being accessable from other
object files, hence __schedule_tail is not accessable from outside of
sched.c
Why make the differenation and why not simply call it schedule_tail and
modify the calls to __schedule_tail to call schedule_tail instead beyond my
current understanding.
Sorry,
Christopher Fairbairn.
------------------------------
From: [EMAIL PROTECTED] (prakash)
Subject: booting problem
Date: 28 May 2001 05:45:45 -0700
Hai to all,
Iam using mpc 823 board. The following output appears
while booting and it exits.
loaded at 00000000 00039AAo
relocated to board data at
Linux/ppc load = root=/dev/ram
Uncompressing Linux....inflate returned %d
exit
and again it tries to boot.
Please can some one suggest me how to boot linux
2.2.14 on powerpc.
Thanx.
------------------------------
From: Fotis Andritsopoulos <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.embedded
Subject: Porting Linux to a new arch
Date: Mon, 28 May 2001 16:17:39 +0300
Hello folks,
We intend to port the linux kernel to an unsuopported processor. While
searching the web, we didn't find anything useful information (like a
'porting guide' or something like that). I'd like to ask you if someone
knows how to start working on this stuff. Are there any 'rules' to start
with porting procedures (web site, papers, etc).
Thanks a lot.
Fotis.
------------------------------
From: Tahar <[EMAIL PROTECTED]>
Subject: Re: Debug kernel
Date: Mon, 28 May 2001 15:33:23 +0200
Reply-To: [EMAIL PROTECTED]
> Every message will go into
> /var/log/messages, in case you don't know.
Only if the syslogd daemon was running !
Tahar
------------------------------
From: Massimiliano Caovilla <[EMAIL PROTECTED]>
Subject: Re: Debug kernel
Date: Mon, 28 May 2001 13:33:19 GMT
Tahar wrote:
>
> > Every message will go into
> > /var/log/messages, in case you don't know.
>
> Only if the syslogd daemon was running !
>
> Tahar
Of course, and unless it is configured to log somewhere else. I only
didn't want to sound pedantic...
Massimiliano
------------------------------
From: Massimiliano Caovilla <[EMAIL PROTECTED]>
Subject: Re: Did not find COAS??
Date: Mon, 28 May 2001 13:43:22 GMT
psy wrote:
>
> Select COAS from the KDE menu
> Choose network, then Ethernet interfaces
> Select new device and choose VIA Rhine PCI driver.
Sorry, don't know COAS but I can tell you that I also have a via-rhine
card:
u will have to recompile the modules from the package you downloaded and
manually install them. THEN you could us COAS or whatever to configure
it.
Seen the answer I posted to your previews messages as M.C. enicon?
I think it applies.
Ciao, Massimiliano
------------------------------
From: [EMAIL PROTECTED] (A. GUILLEVIC)
Subject: F11 and F12 can't be tested within a java application
Date: 28 May 2001 07:20:16 -0700
Hello,
I made a small java client that would run perfectly if I didn't have
some troubles with F11 & F12 keys. I'm using JDK 1.2.2. This small
client run by itself when I connect. X is loaded, then the small
client displays its login screen. When I try to activate some option
thanks to F11 & F12 keys, nothing happens. However, all other F* keys
work perfectly.
What could be wrong ?
Thanks for your help.
------------------------------
From: [EMAIL PROTECTED] (Bob Hauck)
Subject: Re: Did not find COAS??
Reply-To: bobh = haucks dot org
Date: Mon, 28 May 2001 14:44:15 GMT
On Sun, 27 May 2001 20:48:03 -0400, psy <[EMAIL PROTECTED]> wrote:
> Being happy of finally find the answer to my problem (Linux was not
> detecting my ethernet card...) I went in KDE. To my surprise, I did not
> find COAS!! I am missing something?
COAS is a Caldera thing. Do you have a Caldera distribution? If you
do, then you should be able to install COAS from the CD. You can run it
manually by doing alt-f2 in KDE and entering "coastool". You can also
use "coastool" or "lisa" from an xterm.
> How can I make sure to select Via Rhine PCI driver?
Well, COAS automates the steps. If you can't do it that way, you will
have to:
1. Compile the driver and put it in /lib/modules/<kernel-version>/net.
2. depmod -a; modprobe <driver>
3. Configure ethernet (edit /etc/sysconfig/network-scripts/ifcfg-eth0
on Caldera systems).
4. ifup eth0
5. Add driver to /etc/modules/default or /etc/modules.conf or equivalent
to get it to load on boot.
--
-| Bob Hauck
-| To Whom You Are Speaking
-| http://www.haucks.org/
------------------------------
From: [EMAIL PROTECTED] (les ander)
Subject: hash function for ip address
Date: 28 May 2001 09:10:02 -0700
Hi,
I posted a message on the comp.lang.c newsgroup asking for advice on
the
hash function for IP address. They said that I should ask it here
since the linux kernel uses an optimized hashfunction.
I want a hash function for ip address so I am trying ip%BUCKETSIZE,
where
the bucket size is a large prime number(larger than 10000 and not
close
to a power of 2). However I am unsure as to how many insert requests
I'll get, and all I have been said is that I will be tried on with the
worst possible
input cases for IP addresses. Can some one suggest a better hash
function
that will spread my keys uniformly regardless of key distribution.
thanks
------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: fast disk writes
Date: Mon, 28 May 2001 16:12:18 -0000
[EMAIL PROTECTED]
>In article <[EMAIL PROTECTED]>,
>cLIeNUX user <r@cLIeNUX.> wrote:
>>[EMAIL PROTECTED]
>>Al, really? FFS has fragment blocks, all that BSD rotation sync BS, big
>
>Really.
>
>Read the papers on design of these beasts. BTW, modern FFS variants tend
>to drop rotational latency optimizations - disks had changed. So ext2
>is not alone at that.
>
>>blocks...
>>
>>I'm betting ext2 is based on minix, the One True Generic-ass Unix
>>Filesystem.
>
>Thanks for the offer. What's your stake?
>
>--
>Barnum was right.
I thought Linux' first filesystem was Minix, and Remy Card wrote ext2 ON a
Minix filesystem?
Rick Hohensee
reborn every minute
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: g++ => byte alignment
Date: 28 May 2001 17:51:25 +0100
On Mon, 28 May 2001, Vyacheslav Burdjanadze yowled:
>> I want to compile the following with byte-alignment
>> How can I do this.
>> Exists there any compiler-switch or any pragma-calls???
>
> #pragma pack(1) before structure declaration and pragma pack(4 /*or
> appropriate*/ ) after struct declaration.
This is not necessarily supported on all GCC targets, as it's really
there for compatibility with native compilers. __attribute__((packed))
and __attribute__((aligned)) are the native GCC method, and may well be
supported more widely.
--
`Technology is meaningless. What matters is how people _think_
of it.' --- Linus Torvalds
------------------------------
From: John in SD <[EMAIL PROTECTED]>
Subject: Re: is there a way to password protect LILO?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 28 May 2001 17:52:53 GMT
On Sun, 27 May 2001 13:09:56 -0400, Anonymous <[EMAIL PROTECTED]>
wrote:
>Is there a way to password protect LILO
>so some random person can't just
>type
> linux 1
>at the prompt and get into single user mode?
Yes. There is an option for lilo.conf:
password=...
which is part of all version 21 releases of LILO.
Version 22, now in alpha test, adds a more secure password mechanism, and
keywords: mandatory, restricted, and bypass.
The man pages from the alpha release are in the "21.N8" tarball in the "alpha"
directory on the LILO ftp site.
--John
LILO version 21.7 (24-Feb-2001) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches to -2 at ftp://brun.dyndns.org/pub/linux/lilo
------------------------------
Subject: Re: hash function for ip address
From: Paul Repacholi <[EMAIL PROTECTED]>
Date: 29 May 2001 03:34:11 +0800
[EMAIL PROTECTED] (les ander) writes:
> I want a hash function for ip address so I am trying ip%BUCKETSIZE,
> where the bucket size is a large prime number(larger than 10000 and
> not close to a power of 2). However I am unsure as to how many
> insert requests I'll get, and all I have been said is that I will be
> tried on with the worst possible input cases for IP addresses. Can
> some one suggest a better hash function that will spread my keys
> uniformly regardless of key distribution. thanks
return
Seriously. The 'optimal hash' is only optimal for some expected
distribution. For a uniform dist, all are equivalently good/bad.
See Knuths ACP for the analysis.
But, it would be VERY odd to have a uniform distribution for IP
addresses.
--
Paul Repacholi 1 Crescent Rd.,
+61 (08) 9257-1001 Kalamunda.
West Australia 6076
Raw, Cooked or Well-done, it's all half baked.
Spam-To: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],
[EMAIL PROTECTED],[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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************