Linux-Development-Sys Digest #444, Volume #8 Fri, 26 Jan 01 10:13:11 EST
Contents:
Access to beep (echo \a) on embedded system with no console ([EMAIL PROTECTED])
Re: SMP with two different clockspeeds ([EMAIL PROTECTED])
Kernel 2.4.0 crash at startup (Christian Tardif)
Squid Development (FL)
Re: SMP with two different clockspeeds (Josef Moellers)
Re: Squid Development ("Zoran V. Petrovic")
Web Server Replication (FL)
Meaning of LRS and SHARE in /proc/statm (William Lupton)
Re: Help to get microseconds cputime precision (Happosai)
Re: Kernel 2.4.0 crash at startup (Michel Talon)
Re: discarding backing store (Wolfram Gloger)
Process name - function call?? ("Saji R")
Re: Process name - function call?? ("Z")
Re: Writing Athlon Code ("Alan")
Re: discarding backing store (Andi Kleen)
Only 64Mb??? ("Juan")
Re: Web Server Replication (Jem Berkes)
Oops Msg exploring ("O.Petzold")
Re: execv() blocking after using threads ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Subject: Access to beep (echo \a) on embedded system with no console
Date: Fri, 26 Jan 2001 05:58:08 GMT
Folks,
I am building an embedded system, and putting together a custom
kernel.
The hardware is an AMD 486 with 16 meg Flash memory disk, and PCMCIA,
where I am running a Lucent wireless card.
I am short of space, and wish to have a minimal feature kernel.
I wish to have access to the console beep, but I do not need a full
console.
The hardware has a PC-compatible squeaker, that I want to be able
to squeak with 'echo \\a > /dev/console' or something in a shell
script.
What are the kernel defines I need for the minimum configuration ?
I have a single serial port, and wish to be able to log in
in emergency there, so I have the following defines,
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
And I have a getty running from inittab - works great.
But even this
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
Will not let me beep.
Suggestions ?
Cheers, Andy!
Sent via Deja.com
http://www.deja.com/
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: SMP with two different clockspeeds
Reply-To: [EMAIL PROTECTED]
Date: 26 Jan 2001 17:13:06 +1100
[EMAIL PROTECTED] (Ian D Romanick) writes:
[ different-frequency SMP setups ]
>For PC type setups, the answer is no. In fact, there are no boards AT ALL
>that support the Athlon in an SMP environment. When the are (finally)
>released, the will almost certainly be SocketA ONLY. You're best bet is to
>put the 700 in your system, sell the 650 on eBay, and wait for the SMP
>boards to arrive.
While there are no Athlon SMP boards yet, socket370 boards for the Intel
Celeron and FCPGA are available and can indeed be abused by plugging in
CPUs with different core frequencies.
I have done this once in the past. The hardware doesn't appear to have a
problem (after all, the CPUs look the same to the outside; It's just the
internal multiplier that's different), but the software was getting
very very confused about it back then. Getting Linux to *not* use the
cycle counters as a time base took quite a bit of hacking. I'd also be
concerned about the whole bogomips-based timing loop idea.
Things might be better now, this was a long time ago. I should try it
again ;-)
Bernie
--
The man who makes no mistakes does not usually make anything
E.J. Phelps
American diplomat
London, 24 January 1889
------------------------------
From: Christian Tardif <[EMAIL PROTECTED]>
Subject: Kernel 2.4.0 crash at startup
Date: Fri, 26 Jan 2001 06:30:03 -0000
I'm on a Twinhead A5000 portable with Linux Mandrake 7.2 installed. The
initial kernel (2.2.17) is working not so bad. I mean that it is running,
but it only recognize 64 MB on this 128MB system. The sound card is not
working either. I once seen the 2.4.0-0.31 kernel working on it, making
EVERYTHING to work (memory, video, sound, ethernet, etc... But a malicious
user (me) just distroyed the setup completely.
So I decided to reinstall everything, and take advantage of the brand new
2.4.0-6 kernel. The problem is that I just cannot find a way to compile it
correctly. My machine is a Pentium III, with SiS chipset. I'm pretty sure
I've chosen every needed option but, when I try to fire up my computer with
this new kernel, it just hangs at the beginning of the startup process. I
mean, at the really beginning. When I choose my desired kernel in LILO, the
screen just becomes black, and nothing more happens. No CTRL-ALT-DEL
possible. Crashed !!!!!
Any idea ? I really need to make this working !
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: [EMAIL PROTECTED] (FL)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.development
Subject: Squid Development
Date: Fri, 26 Jan 2001 06:10:16 GMT
I would like to know how can I modify the caching scheme of Squid and
where is the location of the code? Thanks a lot!
Regards,
FL
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: SMP with two different clockspeeds
Date: Fri, 26 Jan 2001 08:25:17 +0100
"J.R. Lockwood" wrote:
> My naivete my already be evident, but I am confused about the meaning
> of "symmetric" in "SMP". Does it mean that the two processors must hav=
e
> the same clock speed (ergo, I am S.O.L.) or does it mean that the two
> processors are treated as equal (e.g. no sort of master/slave
> relationship). Short version: is it possible for me to use SMP with
> two processors of differing clock speeds?
While others have commented on the different clock speeds, I'd like to
comment on the "symmetric". In this context, the term "symmetric" refers
to the (software) usage of the CPUs: no CPU has a special purpose, they
all run OS code, device drivers, interrupt handlers ... oh yes, and user
code, too.
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: "Zoran V. Petrovic" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.development
Subject: Re: Squid Development
Date: Fri, 26 Jan 2001 08:13:46 +0100
==============C05D4113B51A389BC583B8B7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
FL wrote:
> I would like to know how can I modify the caching scheme of Squid and
> where is the location of the code? Thanks a lot!
>
> Regards,
> FL
www.squid-cache.org
--
=======================================================================
Zoran V. Petrovic, System Administrator [EMAIL PROTECTED]
Office: DD IRITEL, Batajnicki put 23, 11080 Beograd, Serbia, Yugoslavia
Phone: +381 11 105 042 Ext. 370 ; Fax: +381 11 108 801
==============C05D4113B51A389BC583B8B7
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
FL wrote:
<blockquote TYPE=CITE>I would like to know how can I modify the caching
scheme of Squid and
<br>where is the location of the code? Thanks a lot!
<p>Regards,
<br>FL</blockquote>
www.squid-cache.org
<pre>--
=======================================================================
Zoran V. Petrovic, System
Administrator
[EMAIL PROTECTED]
Office: DD IRITEL, Batajnicki put 23, 11080 Beograd, Serbia, Yugoslavia
Phone: +381 11 105 042 Ext. 370 ; Fax: +381 11 108 801</pre>
</html>
==============C05D4113B51A389BC583B8B7==
------------------------------
From: [EMAIL PROTECTED] (FL)
Crossposted-To: comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps
Subject: Web Server Replication
Date: Fri, 26 Jan 2001 07:51:17 GMT
Hi,
I am now going to replicate the data from one web server to another
web server. Is there any utilities can monitor the changes of one web
server and replicate it automatically to another server? Or I can just
use cp command to copy the content from one server to another when
changes occur? If so, how to monitor the changes and trigger some
events? Thanks you.
FL
------------------------------
From: William Lupton <[EMAIL PROTECTED]>
Subject: Meaning of LRS and SHARE in /proc/statm
Date: Fri, 26 Jan 2001 08:32:38 +0000
I posted this a week or so ago in a relevant-seeming thread but saw no
responses so thought I'd post again...
I have some questions about /proc/statm, specifically the SHARE (shared
memory) and LRS (library resident size) entries. These are all
calculated in proc/fs/array.c.
1. SHARE is the number of resident pages in a process that have a
reference count >1.
2. LRS is the number of resident pages in a process that are not from
the current program, are not on the stack, and end after address
0x60000000.
I am trying to understand exactly what SHARE means. Naively I would
think that >1 process would have to have mapped a page for it to show up
in SHARE. However, this doesn't seem to be the case. I have done
experiments where I link a program that uses a shareable library, and
its SHARE value is the same regardless of how many copies I run.
As for LRS, I don't understand the significance of 0x60000000. I tried
changing the LRS criterion to be "page is executable and is mapped from
a file other than the current program" and that seems to make more
sense.
So, can anyone shed insight on the calculation of these two quantities?
Thanks,
William Lupton
------------------------------
From: Happosai <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Help to get microseconds cputime precision
Date: Fri, 26 Jan 2001 10:19:33 +0100
Thank you very much for all your help!
I can't use gettimeofday because i need the cpu time and i have problems
with the scheduler latencies, as Dave Blake said.
But I will look for information about readtsc.
Thanks again.
Best regards.
------------------------------
From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4.0 crash at startup
Date: Fri, 26 Jan 2001 10:02:09 +0100
Christian Tardif <[EMAIL PROTECTED]> wrote:
> I'm on a Twinhead A5000 portable with Linux Mandrake 7.2 installed. The
> initial kernel (2.2.17) is working not so bad. I mean that it is running,
> but it only recognize 64 MB on this 128MB system. The sound card is not
> working either. I once seen the 2.4.0-0.31 kernel working on it, making
> EVERYTHING to work (memory, video, sound, ethernet, etc... But a malicious
> user (me) just distroyed the setup completely.
I have tried to compile the 2.4.0 coming with Mandrake, it is crap and does
not compile. Just download the standard linux 2.4.0 put the .config which
comes with Mandrake (saves time) and compile. Works perfectly. I am fed up
with these packagers like Mandrake and RedHat. They patch all what they see
and screw everything. Even lpr does not work on my Mandrake 7.2 machine.
--
Michel Talon
------------------------------
From: Wolfram Gloger <[EMAIL PROTECTED]>
Subject: Re: discarding backing store
Date: 26 Jan 2001 11:02:45 +0100
Andi Kleen <[EMAIL PROTECTED]> writes:
> madvise is somewhat cheaper than munmap, but I don't know if the difference
> is benchmarkable.
OK this needs to be tested, but I think even more important is the
following question:
A `large' (at least several pages) region has been freed, and either
MADV_DONTNEED or munmap has been called on it.
Now sometime later the address space is needed again to satisfy a
malloc() request. Is a fresh anonymous mmap() now significantly
faster in the MADV_DONTNEED case than in the munmap case?
Is such a fresh mmap() call even necessary in the MADV_DONTNEED case?
When I access a region marked MADV_DONTNEED, do I get the old content,
or freshly mapped anonymous pages, or SIGSEGV?
> My impression was that glibc uses mmap/munmap only for very big allocations
> (>128MB)
The default threshold is only 128 _k_B, not 128MB ! mmap/munmap is
already used quite extensively for typical GUI applications.
> madvise could be already a win for 4-8K continuous frees to save swap space.
>
> AFAIK the new FreeBSD malloc uses it successfully this way.
...
> Just that free should call madvise when it manages to free at least a full
> page (or maybe two+ pages -- MADV_DONTNEED flushes caches which can be
> sometimes costly -- it needs benchmarking)
>
> I could imagine that e.g. Netscape would benefit from that. Most of its
> bitmaps are probably <MMAP_THRESHOLD, but all of them just shouldn't tie up
> swap space when they're already freed.
OK, I'll take a look at it.
Regards,
Wolfram.
------------------------------
From: "Saji R" <[EMAIL PROTECTED]>
Subject: Process name - function call??
Date: Fri, 26 Jan 2001 19:21:07 +0900
How can i get the process name of a process? is there any C function call
for that? please help
REgards,
Saji R
------------------------------
From: "Z" <[EMAIL PROTECTED]>
Subject: Re: Process name - function call??
Date: Fri, 26 Jan 2001 11:40:50 +0100
Once upon a while "Saji R" <[EMAIL PROTECTED]> wrote:
> How can i get the process name of a process? is there any C function call
> for that? please help
> REgards,
> Saji R
How do you define the name of a process?
A process is accessed thru its PID (process identificator) which
is a number rather than a name. There is no reliable way to get
the command that issued the process. You need to know that every
process on a unix/linux system is derived from the original
init process, hence there is only a process tree which is
defined thru process ID's and the related parent PID (PPID).
If you are working on a sollution for getting the "name" of the
process and your program is not ayming to become a replacement
for 'ps', I'll consider your design flawed.
Overthink once more if there isn't a better sollution to
your problem.
--
Z ([EMAIL PROTECTED])
"LISP is worth learning for the profound enlightenment experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days." -- Eric S. Raymond
------------------------------
From: "Alan" <[EMAIL PROTECTED]>
Subject: Re: Writing Athlon Code
Date: Fri, 26 Jan 2001 11:12:18 -0000
Maximilian Gauger wrote:
> Hi all,
>
> I am doing audio signal processing on an Athlon 800, using SuSE Linux 7.
> Although the Athlon is pretty fast, I guess there might be a chance
> to make it even faster using the 3DNow! architecture (or whatever
> AMD calls it at the moment).
>
> Does anyone know something about a library that makes use of these
> special features of the Athlon? I know about the agcc project, but
> this is alpha code and does not quite look like what I want. I rather
> thought of a library offering vector multiplication support etc.
>
> Even a pointer to something explaining how to do this in assembler code
> would be very welcome.
I do some assembly programming, but have never gone into the MMX 3DNow!
territory. You can get the AMD documents from:
http://www.amd.com/products/cpg/athlon/techdocs/index.html
which also has a like to a page where you can order there development CD-Rom
for free, sounds good.
You might do your self some good and take a little time out to write your
own
audio lib for the Athlon, depends how comfortable you feel with asm
programming.
Though just looking over some of the AMD docs, they do explain using a basic
like
code what each instruction does.
If you want an easy to use assembler try nasm.
>
> X-Posting across cold.apps and cold.system (I'm really not sure
> where this belongs to), F'up2 cold.system.
>
> Thanks a lot,
>
> Max
>
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: discarding backing store
Date: 26 Jan 2001 12:04:01 +0100
Wolfram Gloger <[EMAIL PROTECTED]> writes:
> MADV_DONTNEED or munmap has been called on it.
>
> Now sometime later the address space is needed again to satisfy a
> malloc() request. Is a fresh anonymous mmap() now significantly
> faster in the MADV_DONTNEED case than in the munmap case?
You don't need a new mmap with MADV_DONTNEED.
>
> Is such a fresh mmap() call even necessary in the MADV_DONTNEED case?
> When I access a region marked MADV_DONTNEED, do I get the old content,
> or freshly mapped anonymous pages, or SIGSEGV?
You get freshly mapped anonymous pages (=cache flush and runtime block zeroing,
but less swap space tied if the metadata is outside the page -- i hope it is
usually?)
>
> > My impression was that glibc uses mmap/munmap only for very big allocations
> > (>128MB)
>
> The default threshold is only 128 _k_B, not 128MB ! mmap/munmap is
> already used quite extensively for typical GUI applications.
Oops, read a 1024 factor too much. Anyways the point still holds, but is
less strong.
-Andi
------------------------------
From: "Juan" <[EMAIL PROTECTED]>
Subject: Only 64Mb???
Date: Fri, 26 Jan 2001 13:31:21 GMT
I have a linux box with 512Mb but linux only detects 64Mb. Anybody knows
where's the problem?
I use RedHat 6.2 and kernel 2.2.14. Motherboard is Supermicro 370DLE, and I
have 2 sims 256Mb ECC.
Thank You.
------------------------------
From: Jem Berkes <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Web Server Replication
Date: Fri, 26 Jan 2001 07:36:57 -0600
> I am now going to replicate the data from one web server to another
> web server. Is there any utilities can monitor the changes of one web
> server and replicate it automatically to another server? Or I can just
> use cp command to copy the content from one server to another when
> changes occur? If so, how to monitor the changes and trigger some
> events? Thanks you.
There's a program, "wget" that can recursively download web pages. I
don't know if it can detect changes, though.
--
http://www.pc-tools.net/
DOS, Win32, Linux software
------------------------------
From: "O.Petzold" <[EMAIL PROTECTED]>
Subject: Oops Msg exploring
Date: Fri, 26 Jan 2001 15:57:26 +0100
Hello,
how can I exploring the reason for my crash:
Jan 26 16:29:29 rtreg kernel: Unable to handle kernel NULL pointer
dereferenceLoad Module:
Jan 26 16:29:29 rtreg kernel: at virtual address 0000000c
Jan 26 16:29:29 rtreg kernel: current->tss.cr3 = 0090f000, %cr3 =
0090f000
Jan 26 16:29:29 rtreg kernel: *pde = 00000000
Jan 26 16:29:29 rtreg kernel: Oops: 0000
Jan 26 16:29:29 rtreg kernel: CPU: 0
Jan 26 16:29:29 rtreg kernel: EIP:
0010:[fat:__insmod_fat_S.bss_L2240+138562/43710758]
Jan 26 16:29:29 rtreg kernel: EFLAGS: 00010246
Jan 26 16:29:29 rtreg kernel: eax: 00000000 ebx: c4c3a000 ecx:
00000000 edx: c4c2461c
Jan 26 16:29:29 rtreg kernel: esi: c4c450d8 edi: c4c3a04f ebp:
c159df24 esp: c159df1c
Jan 26 16:29:29 rtreg kernel: ds: 0018 es: 0018 ss: 0018
Jan 26 16:29:29 rtreg kernel: Process insmod (pid: 848, process nr: 42,
stackpage=c159d000)
Jan 26 16:29:29 rtreg kernel: Stack: c4c450d8 c4c45260 c159df3c c4c3a28a
c4c3a000 00000004 c4c3a048 080a1f98
Jan 26 16:29:29 rtreg kernel: c4c3a048 c011636b c159c000 080a1f50
0805eb98 bfffe5fc c4c295fa c159df64
Jan 26 16:29:29 rtreg kernel: 00000006 ffffffea c1d4f000 c1d0c000
00000048 c4c37000 c4c3a048 0000bccc
Jan 26 16:29:29 rtreg kernel: Call Trace:
[fat:__insmod_fat_S.bss_L2240+165112/43684208]
[fat:__insmod_fat_S.bss_L2240+165504/43683816]
[fat:__insmod_fat_S.bss_L2240+120490/43728830]
[fat:__insmod_fat_S.bss_L2240+119840/43729480]
[fat:__insmod_fat_S.bss_L2240+119912/43729408]
[fat:__insmod_fat_S.bss_L2240+119912/43729408]
[sys_init_module+1099/1212]
Jan 26 16:29:29 rtreg kernel:
[fat:__insmod_fat_S.bss_L2240+51738/43797582]
[fat:__insmod_fat_S.bss_L2240+107552/43741768]
[fat:__insmod_fat_S.bss_L2240+119912/43729408]
[fat:__insmod_fat_S.bss_L2240+27435/43821885] [system_call+52/56]
Jan 26 16:29:29 rtreg kernel: Code: 8b 40 0c ff d0 83 c4 04 83 3d 9c 50
c4 c4 00 0f 85 95 00 00
Code; 00000000 Before first symbol
00000000 <_EIP>:
Code; 00000000 Before first symbol
0: 8b 40 0c mov 0xc(%eax),%eax
Code; 00000003 Before first symbol
3: ff d0 call *%eax
Code; 00000005 Before first symbol
5: 83 c4 04 add $0x4,%esp
Code; 00000008 Before first symbol
8: 83 3d 9c 50 c4 c4 00 cmpl $0x0,0xc4c4509c
Code; 0000000f Before first symbol
f: 0f 85 95 00 00 00 jne aa <_EIP+0xaa> 000000aa Before
first symbol
# uname -a
Linux rtreg 2.2.17-rtl3b9 #2 Thu Dec 7 10:25:11 CET 2000 i686 unknown
This is gon etrough ksymoops. I've expected more related to my module.
Thanks
Olaf
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: execv() blocking after using threads
Date: Fri, 26 Jan 2001 14:45:14 GMT
OK, thanks, libc 2.1.3 is the one I'm using but I'll have a look for
something newer...
But why would it block? Seems like SIGUSR1 is used for stopping and
starting threads. Perhaps the signal was lost somewhere along the line?
Another scary observation I've just made. The manager thread has
become a zombie. So we have this...
process A with a thread manager A2
A forks creating process B.
A waits on B.
B calls execv() and hangs forever.
A2 is now a zombie.
Joy.
In article <[EMAIL PROTECTED]>,
"Arthur H. Gold" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> >
> > Greetings good linux people,
> >
> > I have a situlation where calls to execv() are
> > blocking. A stack trace (below) shows execv() is
> > trying to shutdown all running threads before
> > doing the actual exec bit. I already stopped my
> > threads but thread manager thread is perhaps
> > causing the problem?
> Unfortunately, you've provided all but the most relevant
> information, i.e. which libc you are using (ISTR that this
> was fixed in 2.1.3). In any event, the following man page
> should help:
>
> PTHREAD_KILL_OTHER_THREADS_NP
>
> Section: C Library Functions (3)
> Updated: LinuxThreads
> Index Return to Main Contents
>
> NAME
>
> pthread_kill_other_threads_np - terminate all threads in
> program except calling thread
>
> SYNOPSIS
>
> #include <pthread.h>
>
> void pthread_kill_other_threads_np(void);
>
> DESCRIPTION
>
> !pthread_kill_other_threads_np! is a non-portable
> LinuxThreads extension. It causes all threads in the program
> to terminate immediately, except the calling thread which
> proceeds normally. It is intended to be called just before a
> thread calls one of the !exec! functions, e.g. !execve!(2).
>
> Termination of the other threads is not performed through
> !pthread_cancel!(3) and completely bypasses the cancellation
> mechanism. Hence, the current settings for
> cancellation state and cancellation type are ignored, and
> the cleanup handlers are not executed in the terminated
> threads.
>
> AUTHOR
>
> Xavier Leroy <[EMAIL PROTECTED]>
>
> SEE ALSO
>
> !execve!(2), !pthread_setcancelstate!(3),
> !pthread_setcanceltype!(3), !pthread_cancel!(3).
>
> BUGS
>
> According to POSIX 1003.1c, a successful !exec*! in one of
> the threads should terminate automatically all other threads
> in the program. This behavior is not yet
> implemented in LinuxThreads. Calling
> !pthread_kill_other_threads_np! before !exec*! achieves much
> of the same behavior, except that if !exec*! ultimately
> fails, then all
> other threads are already killed.
>
> HTH,
> --ag
> --
> Artie Gold, Austin, TX (finger the cs.utexas.edu account
> for more info)
> mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
> --
> A: Yes I would. But not enough to put it out.
>
Sent via Deja.com
http://www.deja.com/
------------------------------
** 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
******************************