Linux-Development-Sys Digest #731, Volume #6 Thu, 20 May 99 21:14:28 EDT
Contents:
mapping user space and kernel space (Nitin Malik)
Re: accurate timer - HELP! (killbill)
Re: Kernel 2.2.9 is working OK for me. (Konrad Mieredorff)
Re: Changes in signals--probably "meteor" driver bug (Jason Neudorf)
Re: Hostile Takeover of Linux (Lew Pitcher)
Linux-2.2.8, 2.2.9 and update - What's the story? (Chris Rankin)
LINUX ability to handle large beowulf clusters (Jon Roberts)
Re: best distribution (bill davidsen)
Re: 2.2.8 - Evil behavior (bill davidsen)
invalid ELF header in glibc (arjan de boer)
disk access errors on raid0-device ([EMAIL PROTECTED])
Re: accurate timer - HELP! (Nitin Malik)
Re: accurate timer - HELP! (Donald Gillies)
Programming PCI devices (Rajarshi Bandyopadhyay)
Re: mapping user space and kernel space (Robert Kaiser)
Re: mapping user space and kernel space (Robert Kaiser)
Re: LINUX ability to handle large beowulf clusters (Brian Vicente)
minor problem with linux -- any help? ("Sascha Bohnenkamp")
Re: i386 ENTER instruction problem (Pierre Muller)
----------------------------------------------------------------------------
Date: Wed, 19 May 1999 20:10:43 -0400
From: Nitin Malik <[EMAIL PROTECTED]>
Subject: mapping user space and kernel space
I need to map the user buffer to kernel memory to prevent copying
overheads. This is for the tulip network card. This device doesn't have a
mmap() routine. Network devices don't support the mmap routine. Is it
possible to define my own mmap routine?
Can some one give me an outline of how the locking is to be done?
Thanks for your help in advance,
nitin
------------------------------
From: killbill <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.realtime,comp.hardware
Subject: Re: accurate timer - HELP!
Date: Thu, 20 May 1999 20:04:05 GMT
In article <[EMAIL PROTECTED]>,
Dorin-Ioan Marinca <[EMAIL PROTECTED]> wrote:
> How can I count the time (*less than 1us* - even x*10ns) very accurate
> on Linux? I search something not depended on hardware or, if not,
> something Pentium specific.
>
> (gettimeofday() return *realy* microseconds or only something rounded
> at n*10ms?)
Well, I don't know to what degree Linux supports the Posix.4 real time
extensions, but here is what it would look like if it did (all
information taken from "Posix.4 Programming for the Real World", written
by Bill O. GallMeister, published by O`Reilly)
#include <time.h>
struct timespec current_time;
(void) clock_gettime(CLOCK_REALTIME,¤t_time);
The timspec structure appears as:
struct timespec {
time_t tv_sec; // Seconds in interval
long tv_nsec; // nanoseconds in interval
}
Also, as a footnote in the book (1995 issue) reads "The current
generation of SPARC boxes, for instance, supports two timers, each of
which can resolve time down to a granularity of 500 nanoseconds. That's
pretty fine, but SGI's top of the line offers a sporty 21-nanosecond
resolution!".
Anybody know to what degree Linux supports Posix.4?
I also dimly remember somebody developing a real time operating system
that would run Linux as a client, but allow it to talk to and interact
with the real time kernal. Not a bad idea, kind of like a client server
arrangement with two operating systems on the same box.
--
Bil Kilgallon ([EMAIL PROTECTED])
--"I believe, what I believe, has made me what I am. I did not make
it, It is making me, it is the very truth of God, not the invention
of any man". Rich Mullins, quoting G.K. Chesterton.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
From: Konrad Mieredorff <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.2.9 is working OK for me.
Date: Thu, 20 May 1999 19:10:39 +0000
Mike Diack wrote:
> The only oddity I am seeing (though I think it's X related) is occasional
> video corruption of my console screen on exit from X 3.3.3.1 (I'm running
> the SVGA server
> on a S3 Virge, with a Voodoo 1). It's not yet always repeatable but seems to
> happen about 1 time in 2 and remains a problem until shutdown.
I asume that video-corruption is similar to the effect of 'cat'ing a
binary on the console. If that is the case you should check which
programms you run under X produce this output and avoid them.
If it is not the case, I have no idea how to solve your problem.
Bye ...
- Konrad Mierendorff
------------------------------
From: [EMAIL PROTECTED] (Jason Neudorf)
Subject: Re: Changes in signals--probably "meteor" driver bug
Date: 20 May 1999 17:28:19 -0400
Thanks for all the feedback--it seems that the problem may be in the meteor.o
driver, not the kernel itself.
When spawning children,
after each child exits, the "meteor" module usage count goes down by one,
so eventually negative usage occurs. Probably, every time a child closes
the device, memory is freed, captures stop, and signals are no longer sent.
I'll continue any discussion of this on the meteor users list.
Jason Neudorf
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: Hostile Takeover of Linux
Reply-To: [EMAIL PROTECTED]
Date: Thu, 20 May 1999 17:13:30 GMT
ASCII was and *is* a 7-bit code. Some hardware/software vendors have taken
it apon themselves to 'extend' ASCII to an 8-bit code in various methods, but
the approved standard ASCII is still only 7 bits. (BTW, this is mirrored in
the UTF-8 characterset which specifies that the first 128 positions of the
encoding set will be ASCII.
ASCII is defined in ANSI document X3.4-1986 (R1997), and that documents catalog
information reads...
Document Number: ANSI X3.4-1986 (R1997)
Title: Information Systems - Coded Character Sets - 7-Bit American National Standard
Code
for Information Interchange (7-Bit ASCII)
(reaffirmation of ANSI X3.4-1986 (R1992))
Scope: Details information interchange among information processing systems,
communication
systems, and associated equipment.
Specifies a set of 128 characters (control characters and graphics characters such as
letters, digits, and symbols) with their coded
representation. This standard was first listed in the September 15, 1995 issue of
Standards Action. It is being resubmitted due to
substantive changes to the text.
ANSI Approval Date: 12/23/97
On Thu, 20 May 1999 06:26:20 +0200, Olav Woelfelschneider <[EMAIL PROTECTED]> wrote:
>Ross Vandegrift <[EMAIL PROTECTED]> wrote:
>>>If "8-bit is the norm" what is the character with (decimal) code 128?
>RV> The charecter `C' with a squiggle under it: (�).
>
>That is ignorant of e.g. east european languages and many others.
>Into the corner, wear the same donkey hat which says us-people on the top. (-:
>
>Looking for iso-latin turns up quite a list of different character sets,
>numbered from iso-latin-1 to iso-latin-whatever.
>
>--
>Olav "Mac" W�lfelschneider [EMAIL PROTECTED]
>PGP fingerprint = 06 5F 66 B3 2A AD 7D 2D B7 19 67 3C 95 A7 9D AF
>Mer mu� doch nur emol e bissje nochdenke. -- Mundstuhl
Lew Pitcher
System Consultant, Integration Solutions Architecture
Toronto Dominion Bank
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
From: Chris Rankin <au.zipworld.com@{no.spam}rankinc>
Subject: Linux-2.2.8, 2.2.9 and update - What's the story?
Date: Fri, 21 May 1999 08:00:30 +1000
Hi,
When 2.2.8 came out, it said in the notes that I might want to consider
not running the update daemon. Well, I installed and killed the daemon
and noticed that the update daemon was what had been preventing my
system from spontaneously entering the APM "standby" mode. Anyway, then
2.2.9 came out and I upgraded to that - and now I'm hearing horror
stories about 2.2.8 causing file-system corruptions in other systems. I
think that 2.2.9 can be considered "safe", but is this because it's
pretty much backed out everything put in by 2.2.8 (meaning I need to run
update again - which I am) or are there sufficient changes left to make
update unnecessary?
Thanks for clearing this up,
Cheers,
Chris.
------------------------------
From: Jon Roberts <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.os.linux.advocacy
Subject: LINUX ability to handle large beowulf clusters
Date: Thu, 20 May 1999 15:01:43 -0700
I was talking with a friend who is researching a supercomputer design
that may become one of the top 10 machines in the world. I mentioned
Beaowulf Linux clustering and the response was that Linux is good but
can't support more than about 300 nodes in a cluster (and they plan on
being larger than that). Is this true? If there IS a way around this
limitation I'd like to know so I can make further recommendations for
Linux to him.
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: best distribution
Date: 20 May 1999 22:22:36 GMT
In article <J6o03.11008$[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
| What is *needed* is something that will take an existing configuration
| and create the setup file that Kickstart needs. That way you can take
| a box, configure to heart's content, and then run:
|
| # build-kickstart > /tmp/kickstart.specs
|
| ...Which would take the list of installed RPMs, and *ideally* build up
| the specs for an RPM that can reestablish all the changes that took
| place from there, e.g. - Local version of /etc/hosts, /etc/ntp.conf, ...
In the RPM world that would be a good one. For Slackware systems I touch
a file in /root before doing any customization at all. Then I create a
list of every file/dir in the system which has changed, which can be
used for documentation, generation of diffs, determining what you broke,
or backup.
It's important to use find with -cnewer to identify the changes in
permissions which may occur.
Example:
find / -cnewer /root/.installdate >/root/changed_stuff
I use cpio for backups, because getting tar to backup a directory
without backing up what's in the directory is not readily obvious. I bet
it can be done, but cpio works that way by default.
Like:
cpio -cv -Hcrc </root/changed_stuff >/dev/st0
I have been known to put the output in a file and add that to an install
CD image, so I can install and then do the customize later. I can
(sometimes) fit several of the change files on a CD, for various servers
at a site I maintain or some such.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
One common problem is mistyping an email address and creating another
valid, though unintended, recipient. Always check the recipient's
address carefully when sending personal information, such as credit
card numbers, death threats or offers of sexual services.
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: 2.2.8 - Evil behavior
Date: 20 May 1999 22:34:37 GMT
In article <dE803.31614$[EMAIL PROTECTED]>,
bryan <[EMAIL PROTECTED]> wrote:
| # make zdisk
|
| is your friend. use it for test kernels. if it boots, great. if
| not, you didn't touch lilo so it should still work ;-)
I don't even trust myself to remove the floppy from the drive, and
certainly not the help ;-) If you boot an alternate kernel the system
might run days before a problem shows up, it might get booted for some
production reason may time, floppies are too often in when they should
be out and vice versa.
I usually have a few kernels available at the LILO prompt, including one
as bare as I can make it.
All a matter of taste, I hate the taste of floppies. Actually, some of
my machines don't even *have* a floppy, those laptops with the CD,
battery and floppy, pick two.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
One common problem is mistyping an email address and creating another
valid, though unintended, recipient. Always check the recipient's
address carefully when sending personal information, such as credit
card numbers, death threats or offers of sexual services.
------------------------------
From: arjan de boer <[EMAIL PROTECTED]>
Subject: invalid ELF header in glibc
Date: Thu, 20 May 1999 06:55:25 +0000
Hello,
I have a RedHat 5.0 / i586 OS and now and then updated some libaries. No
have the following problem: the gnu assembler and loader (from the
binutils package) complain about the libc.so.6 having an invalid ELF
header. To be more precisely, 'ld' says:
> ld: error in loading shared libraries
> libc.so.6: invalid ELF header
'as' gives similar output. Other programs like 'ls' which also use
'libc.so.6' don't complain. Changing back to the original 'binutils' and
'glibc' RPM's that came with the RH5.0 distribution didn't change the
problem.
What might be the problem - and solution?
thank you.
Arjan de Boer
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: disk access errors on raid0-device
Date: Thu, 20 May 1999 06:57:49 GMT
Hi all,
I'm seeing strange disk errors with a raid0-device consisting of
2 ST446452W U2W-drives attached to a AHA-294X Ultra2 SCSI adapter.
There are other SCSI-disks attached to the same and also other
controllers (of the same type). When I copy large amount of data
from the other drives to the raid-device (with rdist), I often see
the following kernel error messages in the syslog:
May 17 21:24:38 horst kernel: attempt to access beyond end of device
May 17 21:24:38 horst kernel: 08:81: rw=0, want=593012863,
limit=17775891
(also with device numbers 08:71 and 08:91)
These messages then repeat all over, and the machine will eventually
become unresponsively until I reboot it.
The confusing part here is, that
08:71 points to /dev/sde7
08:81 points to /dev/sdf1 and
08:91 points to /dev/sdf11,
and that the limit in the messages is always 17775891.
The raid0-device includes /dev/sde1 and /dev/sdf1 (the ST446452W disks)
and these disks have 45953901 blocks. /dev/sde7 and /dev/sdf11 do not
exist on this system, but there are seven disks that have 17775891
blocks (the number seen as limit in the error messages). These are
ST118273LW
devices that are used as source for rdist.
So, what devices are really causing these errors? the raid-disks or the
source disks? And what about the confusing device numbers 08:x1?
Any comments?
Andreas
P.S.: I'm using Kernel 2.0.36 (SMP) and mdutils-0.41
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 20 May 1999 20:07:19 -0400
From: Nitin Malik <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware,comp.realtime,comp.hardware
Subject: Re: accurate timer - HELP!
use the "rdtsc" pentium instruction.... check the Intel Developer site
for more details
nitin
Dorin-Ioan Marinca wrote:
> Hi!
>
> Please help me in the following problem:
>
> How can I count the time (*less than 1us* - even x*10ns) very accurate
> on Linux? I search something not depended on hardware or, if not,
> something Pentium specific.
>
> (gettimeofday() return *realy* microseconds or only something rounded
> at n*10ms?)
>
> (A linked question: How can I calculate the exact clock frequency for
> an Pentium Processor?)
>
> Thanks in advance for any help (docs / ideas / www pointer / ...),
> D.I.M.
>
> --
> Dorin-Ioan MARINCA
> email: [EMAIL PROTECTED]
> tel: 00 33 - (0)4 72 15 56 81
>
>
--
nitin
------------------------------
From: [EMAIL PROTECTED] (Donald Gillies)
Crossposted-To: comp.os.linux.hardware,comp.realtime,comp.hardware
Subject: Re: accurate timer - HELP!
Date: 20 May 1999 16:52:19 -0700
killbill <[EMAIL PROTECTED]> writes:
>In article <[EMAIL PROTECTED]>,
> Dorin-Ioan Marinca <[EMAIL PROTECTED]> wrote:
>> How can I count the time (*less than 1us* - even x*10ns) very accurate
>> on Linux? I search something not depended on hardware or, if not,
>> something Pentium specific.
>>
>> (gettimeofday() return *realy* microseconds or only something rounded
>> at n*10ms?)
starting with the Pentium and PowerPC both there are clock
cycle-counter registers. These increment at the rate of the system
clock or the bus clock. On the last PowerPC I used, we had a 6.25 Mhz
bus clock rate, so you'd get 160 nanosecond accuracy. Check the
assembly language manuals for Pentium. For an embedded PowerPC, this
routine would do it :
time32_cpp:
time32:
isync /* prevent ppc speculative time reads. */
mftb r3
blr
On a system host like Linux, you've got to expect at least 500 ns or
even 1 microsec just to get into the kernel, so gettimeofday() is
probably all the accuracy you can really hope to get...
Don Gillies - [EMAIL PROTECTED] - Planetwide Software, Inc.
(consultant) / Globalstar Satellite CDMA Project, Qualcomm Inc.,
6455 Lusk Blvd San Diego, California 92121 - phone: 619-651-2326.
Adjunct Professor of EE, UBC, Vancouver BC Canada V6T 1Z4
http://www.ee.ubc.ca/home/staff/faculty/gillies/etc/www/index.html
(remove x's to reply by email)
------------------------------
From: Rajarshi Bandyopadhyay <[EMAIL PROTECTED]>
Subject: Programming PCI devices
Date: Thu, 20 May 1999 11:34:23 +0530
Hello Linux World,
I have got down to my first kernel-hacking, a driver for a PCI data
acquisition card. Can anyone help me with the specifics of PCI? I have a
lot of src code as samples with me, but all are for ISA cards. Any help,
links, docs etc.
Thanx ,
Raj
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: mapping user space and kernel space
Date: 20 May 1999 23:08:04 GMT
In article <[EMAIL PROTECTED]>,
Andi Kleen <[EMAIL PROTECTED]> writes:
> Nitin Malik <[EMAIL PROTECTED]> writes:
>
>
> So making kernel allocated pages available to the user is a cleaner and safer
> choice. It also has been extensively used in the kernel (e.g. for video4linux)
>
> From a design stand point I think it is better too - if you're going
> to let hardware manipulate memory you better have full control over its livetime.
>
I think it really depends on what you are doing: consider a tape
device for instance: nothing is more natural than using read()/write()
to access such a device. Why should that suddenly change if the device
hardware is capable of transferring the data by DMA ? Wether it does
or does not use DMA is not the user program's business. It should be
hidden by the device driver. However, with Linux (in it's unpatched
form), I have no choice but to DMA to a kernel space buffer and then
let the CPU copy it from there to user space. This is just a big waste
of both CPU and memory. And if you are dealing with a really fast tape
(or let's say a fast data acquisition device), that additional memory-
to-memory copy can quickly become a real painful bottleneck.
OTOH I wouldn't even dream of implementing a read()/write() interface
to access -say- a video card's framebuffer. mmap() is a perfectly
sound approach in this case.
Cheers
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Mainz / Germany
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: mapping user space and kernel space
Date: 20 May 1999 22:46:09 GMT
Hi Nitin,
On Thu, 20 May 1999, Nitin Malik wrote:
> After reading your patch i was just having a few doubts...
>
> Doesn't the locking mechanism have a big overhead on performance. Your
> scheme seems to be locking the buffers everytime the user needs to
> read/write. Isn't it better to implement a shared memory mapping initially
> between the user and kernel and lock these pages once, instead of doing it
> everytime? If you have any hints on this one please let me know!!
To be honest, I can't tell you how big the performance overhead
really is. I would expect that it is exessive if the locked pages
have to be swapped in. However, if there are enough free physical
pages around, I would expect the overhead to be faily small. But
this is pure theory, I never actually measured the overhead.
However, my patch does not force you to lock/unlock each time. If you
want, you can just udma_lock() your buffer once, do as many cycles as
you like and udma_unlock() once finished. If the process that owns
the buffer terminates unexpectedly, the buffer should automatically
get unlocked.
Of course, if you want to use the plain read()/write() call interface
to your driver, you would indeed have to lock/unlock for each transfer
(i.e. for each read()/write() call).
> Let me describe what i need. I was thinking of getting rid of the system
> call to read/write by having a memory mapping, so the user can deposit the
> data into the buffers, which the kernel can pick up and.... ofcourse some
> kind of security mechanism should be in place to prevent misuse. If you
> have any tips here let me know.
As I said in my posting: with the current Linux kernel, if a driver
should access user-space data, the only way to do it is to use one
of the memory-to-memory copying functions.
However, you _can_ do it the other way round by allocating the buffer
in the kernel and make it accessible to user-space programs using mmap().
This is a completely different thing though since in this case, the
buffer is owned (and has to be maintained) by the kernel, not by the
user-space program.
It depends on your application which of the two approaches is better
suited.
Cheers
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Mainz / Germany
------------------------------
From: [EMAIL PROTECTED] (Brian Vicente)
Crossposted-To: comp.os.linux.networking,comp.os.linux.advocacy
Subject: Re: LINUX ability to handle large beowulf clusters
Date: Fri, 21 May 1999 00:47:04 GMT
What are the reasons for Linux not being able to support more than
300?
I can't think of anything that has that limitation.
Jon Roberts <[EMAIL PROTECTED]> wrote:
>I was talking with a friend who is researching a supercomputer design
>that may become one of the top 10 machines in the world. I mentioned
>Beaowulf Linux clustering and the response was that Linux is good but
>can't support more than about 300 nodes in a cluster (and they plan on
>being larger than that). Is this true? If there IS a way around this
>limitation I'd like to know so I can make further recommendations for
>Linux to him.
------------------------------
From: "Sascha Bohnenkamp" <[EMAIL PROTECTED]>
Subject: minor problem with linux -- any help?
Date: Thu, 20 May 1999 10:20:34 +0200
hello,
i am using 2.2.x kernels (all have the same behaviour/problem)
my mashine has 512mb/ram and is dual p2/400
when my programm are writing very much data (some gigs) and linux is
flushing its filecache (which is very big than:) ) the system is nearly
unusable until
the flush is done ... is it possible to make this more smooth?
maybe dirty pages should be wirtting more often back to disk?
with 'unusable' i mean i type within a tty and it takes approx 1s for each
keypress to be
seen on screen!
btw. the system is uw-scsi only (adaptec 7895)
thnx
------------------------------
From: [EMAIL PROTECTED] (Pierre Muller)
Subject: Re: i386 ENTER instruction problem
Date: 20 May 1999 09:18:07 GMT
No,
a simple assembler code like
enter $0x3148,$0
at top most level is enough to get a SIGSEGV !
Remark : I don't know how to create an executable from a single
assembler file (so my code is imbedded in FPC code !)
I just want to stress that the value does not have to be over 0x1000
it's just if you pass a page boundary !
------------------------------
** 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
******************************