Linux-Development-Sys Digest #95, Volume #8 Wed, 23 Aug 00 10:13:13 EDT
Contents:
driver-to-kernel call doc ("Hung P. Tran")
Re: modules char-major-6? (John Gluck)
Re: kernel problem for 128MB RAM (John Gluck)
Can I using unexported function or variable in the kernel? ("Huiung Kwon")
Kernel compiling: I need an expert:) (Paul Pygeon)
Re: all threads in a process share the same pid? ("Ross Crawford")
Re: Linux server to hold thousands of tcp connections? (Robert Redelmeier)
Re: Linux server to hold thousands of tcp connections? (David Schwartz)
Programmatically rebooting the system ("David Beardsley")
Re: "Best" x86 Linux C/C++ compiler?? (Markus Kossmann)
Re: Linux server to hold thousands of tcp connections? ("J R")
PCI bus master and memory cache (Peter Pointner)
Re: Programmatically rebooting the system
Sound Programming (Anes Lihovac)
Re: Linux server to hold thousands of tcp connections? (Maciej Golebiewski)
writing into the /proc filesystem (Vijay Lakamraju)
Re: Sound Programming (Jan Panteltje)
Re: "Best" x86 Linux C/C++ compiler?? (Martin von Loewis)
Re: kernel problem for 128MB RAM ("ozetechnology")
Kernel-debugging techniques ("Mikko Jaakkola")
Re: "Best" x86 Linux C/C++ compiler?? (Christopher Browne)
----------------------------------------------------------------------------
From: "Hung P. Tran" <[EMAIL PROTECTED]>
Subject: driver-to-kernel call doc
Date: Tue, 22 Aug 2000 18:25:44 GMT
I am looking for some documentation about all the available calls
from driver to kernel. I've gone through the Device Drivers book
from Rubini, and browse through /usr/src/linux/include/linux to
see the function prototype. Do I really have to dig into the linux
source code to find out about how to use these functions and their
parameters, or that there is documentation somewhere about
these calls ??? Any advice or recommendation is appreciated.
Thanks,
hung
------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: modules char-major-6?
Date: Tue, 22 Aug 2000 15:47:45 -0400
[EMAIL PROTECTED] wrote:
> **** Post for FREE via your newsreader at post.usenet.com ****
>
> Hi,
> Does any know why I kept getting the error message "modprobe: can't
> locate module char-major-6" in my /var/log/message every 5 mintues or
> so. I do not remember when it started, but it's quite annoying everytime
> I check the log. Please enlighten me if you could..
>
> Thanks in advance
>
> Dan
>
> --
> Linux, the choice | Linux, the afterburner for your computer
> of a GNU generation -o) |
> Kernel 2.2.14 /\ |
> on a i586 _\_v |
> |
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
> http://www.usenet.com
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
This means that a module does not exist. If you do an "ls -l /dev", you will
see 2 numbers before the actual device name. These numbers are the major and
minor numbers for the device and will give you a clue as to which module
(driver) is missing.
In the "/etc/modules.conf" file you can look for the string "char-major-6"
this should be aliased to some module name.
If memory serves, "char-major-6" is associated with sound drivers (mixer, dsp,
or something like that). If that's true you won't be able to get sound out of
your system.
--
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: kernel problem for 128MB RAM
Date: Tue, 22 Aug 2000 15:52:57 -0400
Nuclear wrote:
> Hi there,
>
> I'm using RedHat 6.2 (kernel 2.2.14-12).
>
> But when i went onto upgrade my RAM to 128MB SDRAM my system
> drastically slowed down. When I checked the system information thru'
> the system monitor the memory status shown was only 32MB out of 128MB.
> The system seemed to have been using only 32MB out of 128MB.
> Pls. provide solution if available.
>
> Can mail me at [EMAIL PROTECTED] or [EMAIL PROTECTED]
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
You will need to add a line to your /etc/lilo.conf file like so:
append "mem=128m"
You can also do this when the system boots by typeing
linux mem=128m
where linux is whatever the name of your boot image is.
--
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: "Huiung Kwon" <[EMAIL PROTECTED]>
Subject: Can I using unexported function or variable in the kernel?
Date: Wed, 23 Aug 2000 01:14:44 +0900
Hi.
Does anybody know about using unexported functions in the kernel?
I think that the key point is knowing the porinter of unexported functions.
So, I will anaylize the bzImage and find all the symbol tables. Can it be
done easily?
But, I don't know about ELF format or any other information yet.
Please, help me and tell me some comments.
Thanks
------------------------------
From: Paul Pygeon <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Kernel compiling: I need an expert:)
Date: Tue, 22 Aug 2000 17:53:59 -0400
Hi,
I've tried to compile a 2.4.0-test6 kernel and everything
works fine until I tried to make modules. At this time
I've the message below.
Also, if I try to boot with my new kernel, I get this
message:
"Warning: unable to open an initial console
Kernel panic: No init found. Try passing init=option to kernel"
and everything freeze.
If someone can help, it will be appreciate
Many thanks
------------------------------
From: "Ross Crawford" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Date: Wed, 23 Aug 2000 07:49:06 +1000
"Michael Wojcik" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
[snip]
> Which, in turn, was causing other threads to sporadically fail to
> open files using relative pathnames.
>
[snip]
>
> So there's an example of a process-wide cwd causing significant
> trouble. Sure, the immediate fault is in the third-party library,
> which shouldn't be messing with the working directory, but it would
> be nice if I had some way to compensate for that in my code.
Use absolute pathnames??
Regards,
ROSCO
------------------------------
From: Robert Redelmeier <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Tue, 22 Aug 2000 18:20:22 -0500
John Chen wrote:
>
> Will the performance decrease significantly when connections wave up
> to 300 thousand or so?
300,000 at one time? Please consider the implications:
If these 300k are active at *average* dialup speeds (2.4Kbit/s),
then you are talking about 72 MByte/s throughput. This is very
hard to achieve on a single x86 PC box:
a) Gigabit ethernet is at best 125 MB/s .
b) The PCI bus can only handle 133 MB/s flat-out.
c) Main memory read throughput is around 250 MB/s .
Furthermore, you will need at a least 1 Gigabit/s connection
to the `net. The normal way is to have a cluster of PCs.
I would recommend at least 10. They would be 100baseTX
networked to a high speed router.
Now, if the 300,000 are not to have any sustained traffic
at all, that's a different story. Authentication is
certainly reasonable, but for that you don't need to
maintain TCP connections open. Open-and-shut or use
UDP as another poster suggested.
-- Robert
------------------------------
From: David Schwartz <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Tue, 22 Aug 2000 16:28:50 -0700
John Chen wrote:
>
> If the limit number of file descriptors in each process is 1024, does it
> mean that each thread can hold 1024 connections?
There is no such limit.
> Will the performance decrease significantly when connections wave up to 300
> thousand or so?
You can't sustain 300,000 TCP connections on any operating system I
know of.
DS
------------------------------
From: "David Beardsley" <[EMAIL PROTECTED]>
Subject: Programmatically rebooting the system
Date: Tue, 22 Aug 2000 17:47:32 -0700
Is it possible to reboot the system from C/C++ code?
I tried simply using exec to run telinit and shutdown, but even when the
executable is owned by and executed by root it says permission denied.
The reason I want to do this is to be able to remotely reboot a web server
when telnet connections aren't working.
Thanks for any help you can offer.
------------------------------
From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: "Best" x86 Linux C/C++ compiler??
Date: Tue, 22 Aug 2000 20:30:04 +0200
"H.W. Stockman" wrote:
> (2) They used VC++ . I found Intel C/C++ 4.5 produced
> substantially faster code than VC++, on _my_ applications.
>
BTW. Intel will port it's C-Compiler to Linux. Unfortunately the release
is delayed. It was announced for this summer, but now it's scheduled for
1Q 2001.
--
Markus Kossmann
[EMAIL PROTECTED]
------------------------------
From: "J R" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Tue, 22 Aug 2000 22:21:10 -0600
I know for a fact that NetWare can support 100k tcp connections on a single
x86 box.
joe r
"David Schwartz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> John Chen wrote:
> >
> > If the limit number of file descriptors in each process is 1024, does it
> > mean that each thread can hold 1024 connections?
>
> There is no such limit.
>
> > Will the performance decrease significantly when connections wave up to
300
> > thousand or so?
>
> You can't sustain 300,000 TCP connections on any operating system I
> know of.
>
> DS
------------------------------
From: Peter Pointner <[EMAIL PROTECTED]>
Subject: PCI bus master and memory cache
Date: 23 Aug 2000 08:09:53 +0200
General question:
Normally I don't care about things like "write back cache",
"read around write" and so on. If I use bus master access from
a pci card to PC memory, are there any special things I have to
do to ensure that the PC CPU and the board CPU see what I expect?
Special problem:
I have a custom, I960 based pci board. The following sequence is
part of the communication between i960 and pc:
- pc: a) set flag in pc memory to 1
b) interrupt i960 by setting a bit in i960's
"door bell register"
- i960: c) interrupt handler checks and clears "door bell register"
d) interrupt handler checks and clears flag in pc memory
The i960 registers are memory mapped to the PC. The problem is that
sometimes the i960 will get the interrupt, but does not yet see the
flag in pc memory set to one. This happens with one type of PC board,
on two other types I've never seen the problem.
Things I tested:
- call mb() between a) and b): Does not help, but I think it should
be there.
- call udelay(n) between a) and b): Definitely does not help for n
below about 100, makes things better but not stable fo n > 500.
- {volatile int i; for (i=0;i<n;i++);} between c) and d) makes
things better fo n about 10, seems to fix it for n > 100.
- call outb(0, 0x80) between a) and b). This seems to fix it!
My wild guess: The write back cache of the (ALI something) chipset
delays a) for possibly long times. An outb cycle flushes this cache.
Is there anything I should do? Any opinions to what is happening?
Peter
------------------------------
From: <[EMAIL PROTECTED]>
Subject: Re: Programmatically rebooting the system
Date: Wed, 23 Aug 2000 07:25:52 GMT
David Beardsley <[EMAIL PROTECTED]> wrote:
> Is it possible to reboot the system from C/C++ code?
man 2 reboot
Roope
------------------------------
Date: Wed, 23 Aug 2000 10:24:31 +0200
From: Anes Lihovac <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Sound Programming
Hello !
I want to play a sound file and during that,turn the output level up
and down. Can this be done ??? With the included source i got an error !
Thanks in advance and best regards !
Anes
/*
just an stupid example for mixer operations
gcc main.cc -lstdc++ -lpthread
*/
#include <linux/soundcard.h>
#include <iostream.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
#define MIXER "/dev/mixer"
int fd;
void mixer_control(int arg)
{
int status;
status=ioctl(fd,MIXER_WRITE(SOUND_MIXER_VOLUME),&arg);
perror("mixer_control");
if(status==-1)
cout << "mixer_control: Error on mixer " << endl;
}
void *playwav(void* args)
{
while(true)
{
system("cat whistle.au > /dev/dsp");
}
return NULL;
}
int main(int argc,char *argv[])
{
int done=0;
fd=open(MIXER,O_RDWR,0777);
if(fd==-1)
cout << "main:Error on mixer " << endl;
perror("mixer");
pthread_t thread;
pthread_create(&thread,NULL,playwav,NULL);
if(fd)
{
while(!done)
{
for(int i=0;i<10;i++)
mixer_control(i);
for(int i=10;i>0;i--)
mixer_control(i);
}
}
if(fd)
close(fd);
return 1;
}
------------------------------
From: Maciej Golebiewski <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Wed, 23 Aug 2000 10:38:07 +0200
> I know for a fact that NetWare can support 100k tcp connections on a single
> x86 box.
Has anyone seen it working? If yes, was it usable with 100K open and active
connections?
Maciej
------------------------------
From: Vijay Lakamraju <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: writing into the /proc filesystem
Date: Wed, 23 Aug 2000 02:08:04 -0400
Hi Folks,
I need to write to the virtual address space of processes and
to the physical memory. I realise one way you can
do it is through the /proc filesystem, more specifically the files
/proc/<pid>/mem and /proc/kcore.
While I am able to correctly read variables at certain addresses
in the virtual space of processes, I am not able to write to the
files even as root and even when they have write permissions.
I used the system call write() to write to certain locations but
it refuses to write even though I could successfully read() from that
location. Am I missing something here?
Thanks for any help,
Vijay
--
Architecture and Real-time Lab
310 Knowles Engg. Bldg.
University of Massachusetts
AMHERST, MA 01003
email: [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Jan Panteltje)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Sound Programming
Date: Wed, 23 Aug 2000 12:43:21 GMT
>Hello !
>
>I want to play a sound file and during that,turn the output level up
>and down. Can this be done ???
Yes of cause.
>With the included source i got an error !
What error;-)????
>
>Thanks in advance and best regards !
>
>Anes
>
>/*
> just an stupid example for mixer operations
>
> gcc main.cc -lstdc++ -lpthread
>*/
>
>#include <linux/soundcard.h>
>#include <iostream.h>
>#include <sys/types.h>
>#include <sys/stat.h>
>#include <sys/ioctl.h>
>#include <fcntl.h>
>#include <stdio.h>
>#include <unistd.h>
>#include <pthread.h>
>#include <stdlib.h>
>
>#define MIXER "/dev/mixer"
>
>int fd;
>
>void mixer_control(int arg)
>{
> int status;
>
> status=ioctl(fd,MIXER_WRITE(SOUND_MIXER_VOLUME),&arg);
>
> perror("mixer_control");
>
> if(status==-1)
> cout << "mixer_control: Error on mixer " << endl;
>}
>
>
>void *playwav(void* args)
>{
> while(true)
> {
> system("cat whistle.au > /dev/dsp");
> }
>
> return NULL;
>}
>
>int main(int argc,char *argv[])
>{
> int done=0;
>
> fd=open(MIXER,O_RDWR,0777);
>
> if(fd==-1)
> cout << "main:Error on mixer " << endl;
>
> perror("mixer");
>
> pthread_t thread;
>
> pthread_create(&thread,NULL,playwav,NULL);
>
> if(fd)
> {
> while(!done)
> {
> for(int i=0;i<10;i++)
> mixer_control(i);
>
> for(int i=10;i>0;i--)
> mixer_control(i);
> }
> }
>
> if(fd)
> close(fd);
>
> return 1;
>}
>
------------------------------
From: Martin von Loewis <[EMAIL PROTECTED]>
Subject: Re: "Best" x86 Linux C/C++ compiler??
Date: 23 Aug 2000 15:06:51 +0200
"H.W. Stockman" <[EMAIL PROTECTED]> writes:
> I'd truly like to see comparable performance.
I believe at the moment, there is no other choice but gcc on
Linux. With some effort, you may be able to find a copy of lcc, but I
have no idea which would perform better.
There is also The Portland Group CC, http://www.pgroup.com; I don't
have any performance information on that compiler, either.
> I remember writing curses and TeK4010 consoles in Unix. They seemed
> awfully analogous to win32 console apps. I've seen conio.h show up
> in linux Discussions, so _someone_ must do this sort of thing.
People migrating from DOS often ask for conio, and are always referred
to curses. This is a FAQ, that's why it shows up in discussions.
Regards,
Martin
------------------------------
From: "ozetechnology" <[EMAIL PROTECTED]>
Subject: Re: kernel problem for 128MB RAM
Date: Wed, 23 Aug 2000 23:53:42 +1000
after you update your lilo.conf file you must rerun lilo to make sure the
changed are not ignored.
David
Site: www.ozetechnology.com
+++ New Images in the Gallery +++
In article <[EMAIL PROTECTED]>, John Gluck
<[EMAIL PROTECTED]> wrote:
> Nuclear wrote:
>
>> Hi there,
>>
>> I'm using RedHat 6.2 (kernel 2.2.14-12).
>>
>> But when i went onto upgrade my RAM to 128MB SDRAM my system
>> drastically slowed down. When I checked the system information thru'
>> the system monitor the memory status shown was only 32MB out of 128MB.
>> The system seemed to have been using only 32MB out of 128MB. Pls.
>> provide solution if available.
>>
>> Can mail me at [EMAIL PROTECTED] or [EMAIL PROTECTED]
>>
>> Thanks.
>>
>> Sent via Deja.com http://www.deja.com/ Before you buy.
>
> You will need to add a line to your /etc/lilo.conf file like so:
>
> append "mem=128m"
>
> You can also do this when the system boots by typeing
>
> linux mem=128m
>
> where linux is whatever the name of your boot image is.
>
> --
> 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: "Mikko Jaakkola" <[EMAIL PROTECTED]>
Subject: Kernel-debugging techniques
Date: Wed, 23 Aug 2000 14:01:21 GMT
Helloe everyone!
I'm having problems debugging error occuring at interrupt-level. I'm trying
to use screen-dumps to see what is going on but the debug-messages scrolls
off my screen, which makes this technique very hard. I would imagine that I
could use serial-cable to for screen dumps but I don't have a glue how to
set it up.
I'm sure there is plenty of people who have found their "box of trick" to
wrestle with same issue. I would be very happy to hear about other people's
debugging techniques.
Best Regards, Mikko
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: "Best" x86 Linux C/C++ compiler??
Reply-To: [EMAIL PROTECTED]
Date: Wed, 23 Aug 2000 14:08:21 GMT
Centuries ago, Nostradamus foresaw a time when Martin von Loewis
would say:
>"H.W. Stockman" <[EMAIL PROTECTED]> writes:
>> I'd truly like to see comparable performance.
>
>I believe at the moment, there is no other choice but gcc on
>Linux. With some effort, you may be able to find a copy of lcc, but I
>have no idea which would perform better.
lcc does not have nearly as aggressive an optimizer; its purpose
of existence included being a "literate program," which precludes
some of the messiness of heavy optimization.
>There is also The Portland Group CC, http://www.pgroup.com; I don't
>have any performance information on that compiler, either.
Probably quite good for numerical work; that's the prime area that
they sell to.
Which brings up the issue that we haven't heard enough information
about the application to assess _anything_ about what aspects of it
might benefit from performance tuning.
If the app is primarily I/O-bound, then the quality of code produced
by the compiler is largely irrelevant. The sorts of differences made
by differing compilers tend to sit around the 10-30% level; if the
application spends 90% of its time waiting for I/O, that means that the
30% improvement _really_ represents a 3% improvement which will be
hardly noticeable.
>> I remember writing curses and TeK4010 consoles in Unix. They seemed
>> awfully analogous to win32 console apps. I've seen conio.h show up
>> in linux Discussions, so _someone_ must do this sort of thing.
>
>People migrating from DOS often ask for conio, and are always referred
>to curses. This is a FAQ, that's why it shows up in discussions.
... And it would be a good idea to also look at the S-LANG libraries,
which provide similar functionality along with _some_ higher level
display abstractions along with a scripting language. Used to
implement the SLRN news reader, the Mutt mail client, the Emacs
"clone," JED, and even some of the console web browsers. See:
<http://directory.google.com/Top/Computers/Programming/Languages/S-Lang/>
--
[EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/>
"Feel free to contact me (flames about my english and the useless of
this driver will be redirected to /dev/null, oh no, it's full...)"
-- Michael Beck, describing the PC-speaker sound device
------------------------------
** 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
******************************