Linux-Development-Sys Digest #438, Volume #8 Tue, 23 Jan 01 14:13:14 EST
Contents:
Re: Distributed FileSystem (Nix)
Re: double mmap calls ([EMAIL PROTECTED])
Re: double mmap calls (Linus Torvalds)
2.4.0 fails to boot if SMP enabled (Kent A Vander Velden)
Re: double mmap calls (Andi Kleen)
Re: double mmap calls ([EMAIL PROTECTED])
Re: double mmap calls ([EMAIL PROTECTED])
Re: Running MSC6/MSC7 under linux? (Rod Roark)
Re: 2.4.0 fails to boot if SMP enabled (Kent A Vander Velden)
Re: How to write an application similar to "ps -aux" (Josef Moellers)
Re: booting CD, ramfs -> / in 2.4, some issues (Robert Kaiser)
linking with libc5 _and_ glibc ? ("pkh2hi")
__buggy_fxsr_alignment undefined (J�rgen Koslowski)
modutil & unresolved symbols (franz reitinger)
Re: double mmap calls (Dragan Cvetkovic)
NMI calling an own handler in a kernel module ("Arno Geissel")
The fastest way to write a pixel under X (Ugo Erra)
Re: The fastest way to write a pixel under X ([EMAIL PROTECTED])
Re: The fastest way to write a pixel under X (Philip Armstrong)
----------------------------------------------------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: Distributed FileSystem
Date: 22 Jan 2001 22:11:54 +0000
On Mon, 22 Jan 2001, Alexander Eichhorn gibbered:
> Oh, that isn't an easy task and too much work for a single person.
> If you're interested in distributed filesystems, have a look at the
> CODA Filesystem from the Carnegie Mellon University:
>
> http://www.coda.cs.cmu.edu/
>
> Take this as a very good starting point.
<http://www.inter-mezzo.org/> may be an easier starting point. Coda is
*so* large that you're apt to get swallowed up by it. :)
--
`Anyhow, that pipe dream doesn't say anything about the question you
asked. (I am planning for a career in politics.)' --- Mark Mitchell
on the GCC list
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: double mmap calls
Date: Mon, 22 Jan 2001 23:13:53 -0000
On 22 Jan 2001 15:38:45 -0500 Dragan Cvetkovic <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] (Linus Torvalds) writes:
|> Also, if you actually want just /dev/zero, you might as well forget
|> about open() altogether, and do
|>
|> mmap( ,,, MAP_SHARED | MAP_ANONYMOUS, -1, 0)
|>
|> because you don't need a file descriptor to get an anonymous mapping.
|
| Just a word of warning that MAP_ANONYMOUS is not universaly available
| (which might be a non-issue if you are just developing for Linux and/or
| BSD),. i.e. SVR4 system lack this feature.
So tell me what the universal way is ... what one way works on all
the systems you know (and including Linux, of course).
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: [EMAIL PROTECTED] (Linus Torvalds)
Subject: Re: double mmap calls
Date: 22 Jan 2001 15:36:16 -0800
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>
>So tell me what the universal way is ... what one way works on all
>the systems you know (and including Linux, of course).
There is no universal way, of course. The gcc lists had an interesting
discussion about some SCO UnixWare thing (or something) that actually
has the MAP_ANON #defines in the headers, so the program will compile.
When you actually _run_ it, it turns out that MAP_ANON doesn't actually
work (silently).
And with Linux, it for the longest time was true that MAP_ANONYMOUS did
_not_ work with MAP_SHARED (and /dev/zero did the same), but worked fine
with normal private mappings. So we shouldn't throw stones in glass
houses in this particular area ;)
The SysV shared memory thing is probably the most portable approach, but
it's rather less flexible than mmap (it has other advantages, of
course).
Linus
------------------------------
From: [EMAIL PROTECTED] (Kent A Vander Velden)
Subject: 2.4.0 fails to boot if SMP enabled
Date: 22 Jan 2001 23:39:55 GMT
With my Asus P2B-D motherboard with a couple of Celeron chips installed,
Linux 2.4.0 fails to boot if SMP is enabled in the kernel. The kernel
hangs just after printing a message something like
"NET4: Unix domain sockets 1.0/SMP for Linux NET4.0." Disabled SMP in the
kernel and everything seems to be fine.
Any suggestions on how to fix this would be greatly appreciated.
Thanks.
--
Kent Vander Velden
[EMAIL PROTECTED]
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: double mmap calls
Date: 23 Jan 2001 00:54:17 +0100
[EMAIL PROTECTED] (Linus Torvalds) writes:
> There is no universal way, of course. The gcc lists had an interesting
> discussion about some SCO UnixWare thing (or something) that actually
> has the MAP_ANON #defines in the headers, so the program will compile.
> When you actually _run_ it, it turns out that MAP_ANON doesn't actually
> work (silently).
Sounds like MAP_SHARED for IA32 programs when you run it in IA64 Linux
compiled with page sizes > 4k @)
-Andi
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: double mmap calls
Date: Tue, 23 Jan 2001 02:03:23 -0000
On 22 Jan 2001 12:09:55 -0800 Linus Torvalds <[EMAIL PROTECTED]> wrote:
| In article <[EMAIL PROTECTED]>,
| <[EMAIL PROTECTED]> wrote:
|>|
|>| Simplicity is a virtue too.
|>
|>I'd agree. But I was wondering why not make it even simpler like:
|>
|> fd = open("/dev/zero",O_RDWR,0);
|
| /dev/zero won't do what you want it to do - you want to map the _same_
| physical page twice, right?
|
| /dev/zero will give you different physical pages: they'll be shared
| after a fork(), but they won't be shared across multiple mmap's. Think
| of each "mmap()" as opening a separate file, that is "shared" only in
| the sense that fork() won't do the copy-on-write thing.
So even if it is the same file descriptor, this isn't treated as the
same file?
| Also, if you actually want just /dev/zero, you might as well forget
| about open() altogether, and do
|
| mmap( ,,, MAP_SHARED | MAP_ANONYMOUS, -1, 0)
|
| because you don't need a file descriptor to get an anonymous mapping.
Obviously, this doesn't give a means for 2 different mmap() calls to
refer to the same piece of memory.
| But I bet you want the tmp-file backing store - it acts as an anchor to
| make your mmap's truly shared.
I want to avoid an actual file if at all possible. Supposedly I can
unlink the file after doing the 2 mmap() calls. But I don't want the
space being stored on that filesystem. If the space gets swapped out,
it should be to the swap space. If there is no swap space at all, then
it can't be swapped out. Now if that happens due to copy on write,
that would be fine, but I don't know if that would work with the data
still shared between the 2 adjacently located mappings. Hopefully a
very minimum of physical I/O to the /tmp filesystem will happen as a
result of the open/close/unlink and none from writing to the space.
| (Alternatively, you can just use SysV shared memory, of course, and use
| shmat to map it in multiple places.)
Well, I would like a universal way. Maybe that's not possible, and
could explain the lack of a solution when I asked the same question
on comp.unix.programmer.
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: double mmap calls
Date: Tue, 23 Jan 2001 03:04:23 -0000
On 22 Jan 2001 15:36:16 -0800 Linus Torvalds <[EMAIL PROTECTED]> wrote:
| The SysV shared memory thing is probably the most portable approach, but
| it's rather less flexible than mmap (it has other advantages, of
| course).
Well, I know SysV systems like Solaris do it. I just checked OpenBSD 2.8
and it has the man page, so I assume it does it. I'm installing FreeBSD
4.2 right now to see if it does. That should cover most of the major
platforms, which is already OT for this group :-)
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: Rod Roark <[EMAIL PROTECTED]>
Subject: Re: Running MSC6/MSC7 under linux?
Crossposted-To: comp.os.linux.development.apps
Date: Mon, 22 Jan 2001 23:02:49 -0800
Check out http://www.dosemu.org/. Let me know if it works. :-)
-- Rod
http://www.sunsetsystems.com/
Jeff D. Hamann wrote:
> As horrid as this sounds...
>
> I have to develop applications (binary compatible applications) that
> will run on a DOS 5 binary compatible data recorder. I'm tired of
> trying to find an old DOS machine, load the required MS 6 C compiler,
> building the tiny app, then shelving the machine for another 6 months
> to a year, only to repeat the cycle. My questions are:
>
> Can I run MSC 6/7 under linux somehow and build apps that are binary
> compatible with early versions of DOS?
>
> Thanks,
> Jeff.
------------------------------
From: [EMAIL PROTECTED] (Kent A Vander Velden)
Subject: Re: 2.4.0 fails to boot if SMP enabled
Date: 23 Jan 2001 07:23:14 GMT
This problem turned out to be related to the fact that I had the Int.
crypto stuff 2.4.0-2 patch installed. Updating to 2.4.0-3 patch fixed
the problem and 2.4 seems to be working just fine.
> With my Asus P2B-D motherboard with a couple of Celeron chips installed,
>Linux 2.4.0 fails to boot if SMP is enabled in the kernel. The kernel
>hangs just after printing a message something like
>"NET4: Unix domain sockets 1.0/SMP for Linux NET4.0." Disabled SMP in the
>kernel and everything seems to be fine.
--
Kent Vander Velden
[EMAIL PROTECTED]
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to write an application similar to "ps -aux"
Date: Tue, 23 Jan 2001 08:58:03 +0100
Alan Po wrote:
> =
> Dear sir
> =
> Thanks your hints again. However is there system function can return th=
e
> symbolic name. I use a system function "glob" to get all files in a
> directory but cannot get the filename in the link.
readlink(2) is your friend.
(Posted and mailed)
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: booting CD, ramfs -> / in 2.4, some issues
Date: 23 Jan 2001 10:02:16 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> 2. The "df" command shows nothing but "cat /proc/mounts" works.
> Doing "df" on a specific mounted filesystem does work. Here's
> what I get (I've pulled the actual unmounting of /mnt for now):
>
This is probably because df dies on a division by zero error. I've
noticed this with the busybox version of df and I suspect that
the standard df has the same problem: the statfs syscall, when applied
to ramfs returns zeroes for the total blocks and free blocks, which df
is not prepared to handle.
BTW, another problem with ramfs is that it completely hangs the
the system if it gets full (i.e. to reproduce, do a
dd if=/dev/zero of=/ramfs/junk and wait a while...). No ENOSPC or
the like, the system just freezes..
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH http://www.elinos.com
Klein-Winternheim / Germany http://www.sysgo.de
------------------------------
From: "pkh2hi" <[EMAIL PROTECTED]>
Subject: linking with libc5 _and_ glibc ?
Date: Tue, 23 Jan 2001 11:32:54 +0100
Hi,
I'm still using some old odbc-libraries, that have been compiled for an old
libc-5 system.
I want to compile my programs with them on the newest distributionThe linker
always tells me of some unkown symbols, especially "_stat". I dont have
sources for the libs, so I copied the
old libc to my new system, renamed it and found, that linking with
_both_ c-libs would work. e.g.: gcc -lglibc -llibc5
My questions are
- the program is running, but will it run stable ?
- anyone tried this before ?
- is this the recommended approach or are there other solutions ?
Thanks for every hint,
Heiko Penschuck
------------------------------
From: [EMAIL PROTECTED] (J�rgen Koslowski)
Subject: __buggy_fxsr_alignment undefined
Date: 23 Jan 2001 13:05:44 GMT
Hi,
When trying to compile the latest 2.4.1pre or 2.4.0ac kernels, I get
the following error message at the end:
-o vmlinux
init/main.o: In function `check_fpu':
init/main.o(.text.init+0x53): undefined reference to `__buggy_fxsr_alignment'
make: *** [vmlinux] Error 1
The offending function occurs in linux/include/asm-i386/bugs.h. The
2.4.0 kernel comiled fine and runs ok. Any ideas?
-- J�rgen
--
J�rgen Koslowski If I don't see you no more on this world
ITI, TU Braunschweig I'll meet you on the next one
[EMAIL PROTECTED] and don't be late!
http://www.iti.cs.tu-bs.de/~koslowj Jimi Hendrix (Voodoo Child, SR)
------------------------------
Date: Tue, 23 Jan 2001 14:20:29 +0100
From: franz reitinger <[EMAIL PROTECTED]>
Subject: modutil & unresolved symbols
Hi!
I'm using modules on a broad scale & up till now I had only a few
troubles.
Now I have to used a compiled modules which differs from the used kernel
version. I made a reconfiguration of the kernel in activating
"Set version information ...". After recompiling and updating the kernel
I restarted the system. Suddenly the kerneled was not able to load one
of the many modules. All the modules had suddenly unresolved externals.
I checked the modules using depmod -ae -F /boot/System.map & got no
errors. It seems that the kernel needs the information of the
system.map.
How can I match it that I either can load them manually (insmod) or
autoatically using the information in the System.map or better:
What I'm doing/thinking wrong?
System:
RedHat 6.2
modutils 2.3.20
Kernel 2.2.x and higher
ThanX
franzR
------------------------------
Subject: Re: double mmap calls
From: Dragan Cvetkovic <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: 23 Jan 2001 09:16:45 -0500
[EMAIL PROTECTED] (Pete Zaitcev) writes:
> > > #ifndef MAP_ANONYMOUS
> > > #define MAP_ANOMYMOUS MAP_ANON
> > > #endif
> > >
> > > which gets you working on a number of systems.
>
> > Notably exception being Solaris. I wish they implement this
> > feature, so that I don't have to ifdef my code any more :-(
> >
> > Dragan
>
> How long ago have you tried? Solaris has anonymous mmap for
> quite some time. Solaris 8 adds a define just like the above
> specifically for compatibility with Linux.
>
> -- Pete
Well it certainly doesn't work in Solaris 2.6 and Solaris 7. You
are right about Solaris 8.
Bye, Dragan
P.S. I am not sure about "specifically for compatibility with Linux" bit,
since MAP_ANON existed in BSD 4.3 (cf. Stevens APUE, p. 470), long before
Linux existed. Besides, Linux defines MAP_ANON in terms of
MAP_ANOMYMOUS. OK, I will stop now.
--
Dragan Cvetkovic,
To be or not to be is true. G. Boole
------------------------------
From: "Arno Geissel" <[EMAIL PROTECTED]>
Subject: NMI calling an own handler in a kernel module
Date: Tue, 23 Jan 2001 16:49:52 +0100
Hi,
anyone who can tell me how to get an own handler in a kernel module beeing
called on
a NMI interrupt?
I tried it by exporting set_trap_gate from the kernel and calling it out of
a module.
This caused a general protection fault.
Arno
------------------------------
From: Ugo Erra <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.x,comp.os.linux.development.apps,de.comp.os.unix.x11
Subject: The fastest way to write a pixel under X
Date: Tue, 23 Jan 2001 18:21:24 +0100
Hello everybody, we're writing a small cluster-oriented
3d graphic library. Since our first tests the output in an
X Window window looks slow and "wormish" but the stranest thing is
that the speed seems to vary sensibly partially overlapping our
output window with another.
We think that the bottleneck must reside in the way we draw a pixel
that is through XDrawPixel and so the request have to cross the socket
and the X Server to arrive on my monitor !!!
This situation convinced us to ask "Which is the fastest way to
'shot' a pixel on a window under X Window ?".
We're using XFree 3.3.5 could help to install DRI or the new version
of XFree (which seems support DRI directly ?) ? We won't use the DRI
capability of direct access to the 3d accelleration at all.
Thank you in advance.
Rosario De Chiara
Ugo Erra
Cluster Graphic Library Group
University of Salerno
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.x,comp.os.linux.development.apps,de.comp.os.unix.x11
Subject: Re: The fastest way to write a pixel under X
Date: 23 Jan 2001 17:27:07 GMT
In article <[EMAIL PROTECTED]>, Ugo Erra <[EMAIL PROTECTED]> wrote:
>Hello everybody, we're writing a small cluster-oriented
>3d graphic library. Since our first tests the output in an
>X Window window looks slow and "wormish" but the stranest thing is
>that the speed seems to vary sensibly partially overlapping our
>output window with another.
>We think that the bottleneck must reside in the way we draw a pixel
>that is through XDrawPixel and so the request have to cross the socket
>and the X Server to arrive on my monitor !!!
>
>This situation convinced us to ask "Which is the fastest way to
>'shot' a pixel on a window under X Window ?".
If you're drawing alot of pixels, sending them one at a time to the X server
is probably the least efficient technique. Fastest would be 3D graphics
extensions which communicate with the X server at a vector level.
Shared memory images are also fast if they fit your rendering model.
--
Ken Lee, http://www.rahul.net/kenton/
------------------------------
From: [EMAIL PROTECTED] (Philip Armstrong)
Crossposted-To: comp.os.linux.x,comp.os.linux.development.apps,de.comp.os.unix.x11
Subject: Re: The fastest way to write a pixel under X
Date: 23 Jan 2001 18:38:21 -0000
In article <94ketb$kep$[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>, Ugo Erra <[EMAIL PROTECTED]> wrote:
>>We think that the bottleneck must reside in the way we draw a pixel
>>that is through XDrawPixel and so the request have to cross the socket
>>and the X Server to arrive on my monitor !!!
>>
>>This situation convinced us to ask "Which is the fastest way to
>>'shot' a pixel on a window under X Window ?".
>
>If you're drawing alot of pixels, sending them one at a time to the X server
>is probably the least efficient technique. Fastest would be 3D graphics
>extensions which communicate with the X server at a vector level.
>Shared memory images are also fast if they fit your rendering model.
Ugh. Round trips to the Xserver are to be avoided at all costs if you
want performance. Depending on whether your apps are on the same
machine as the display, you could try rendering to a shared memory
image as suggested above, or to a local pixmap which you can send to
the Xserver in one go...
Phil
--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
------------------------------
** 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
******************************