Linux-Development-Sys Digest #794, Volume #7 Sat, 22 Apr 00 16:13:15 EDT
Contents:
Re: Read combining on memory-mapped I/O? ("David Ellsworth")
Re: Porting our compiler to Linux (Andi Kleen)
Linux & games consoles? ("Simon")
Reading video memory at 18 megabytes/sec ("David Ellsworth")
Re: Is It Possible To Decompile Kernel Modules? (Grant Edwards)
Dual processor pthreads and stdio -- not thread-safe? (Robert Sim)
DMA memory-to-memory ("David Ellsworth")
Re: LIMITS OF LINUX.........PLEASE HELP (John McKown)
make xconfig kernel bug? (Michael Kelly)
end of a device-file (Christian Reiser)
read from kernel (Badrinath Venkatachari)
Far pointer ("Jan Lund Kristensen")
Re: DMA memory-to-memory (Mario Klebsch)
getting started... ("Clint Box")
Re: Linux Ports (Tony Davis)
Re: Porting our compiler to Linux (William Burrow)
----------------------------------------------------------------------------
From: "David Ellsworth" <[EMAIL PROTECTED]>
Subject: Re: Read combining on memory-mapped I/O?
Date: Sat, 22 Apr 2000 12:38:13 GMT
"Juergen Fischer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> you got 18mb/s after setting cachemode of vram adressspace to write
> thru ? can you really read vram at 18mb/s ?
Yes, I absolutely did. Problem is, it was awfully unstable due to Linux's
memory management code. On several occasions, I was able to capture an 18
megabyte per second stream to memory, then write it to a file. I verified
that the fields were captured at 59.94 per second, and I even played back
the saved streams to verify that there were no cache hits during the capture
(i.e., there were no persistant pixels from frame to frame). The problem is,
I could usually do this only once. A second time, and Linux would crash.
I know for a fact that this is Linux's fault, because I did the same MTRR
setting and started Windows 98, and the ATI driver did stable lossless
capturing. Problem is, even with "Capture to memory" checked, it could only
capture 10 continuous fields without drop-out, presumably because of a small
buffer.
When I do get the Linux kernel instability worked out, I'll still need to
figure out how to simultaneously read from video memory and write to disk!
In my tests, capturing one raw NTSC field (640x240 YUV 4:2:2 = 300 KB) took
approximately 80% of the time allotted to that field (1/59.94 sec). My hard
disk can support a substained transfer of 18MB/sec, but not in 20% of the
time!
> what about DMA ?
I've been wondering about that. Is it possible to do a memory-to-memory DMA
burst transfer? The only kind of DMA I know about is the kind orchestrated
by a peripheral card, such as a sound card.
=====
To reply through email, please remove NO and SPAM from my address.
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting our compiler to Linux
Date: 22 Apr 2000 15:37:31 +0200
"Norman Black" <[EMAIL PROTECTED]> writes:
>
> > >1. Specifics of application startup ( I have looked at the glibc source
> code
> > >but some symbols are missing)
> >
> > Perhaps those are in crt0.o, supplied by the fine C compiler.
>
> No crt0 source in glibc 2.1. I found various (numerous) start.c files. The
> ELF start files refer to a symbol not declared anywhere in the glibc source
> code (libc_start_main)
glibc has __libc_start_main. Maybe you forgot the underscores.
If you want to use glibc for your executables it is probably the easiest
to just supply a C-like main() and call your initialization from there
(e.g. the GNU Ada compiler GNAT uses this approach). You can also run
arbitary code earlier by putting a pointer to it into the ctors section.
If you want to live outside glibc you're on your own.
-Andi
------------------------------
From: "Simon" <[EMAIL PROTECTED]>
Subject: Linux & games consoles?
Date: Sat, 22 Apr 2000 14:07:46 +0100
There was talk almost a year ago of porting Linux to the playstation. Did
the project ever get anywere?
I did a few "back of envelope" calculations and I rekon that ~90 dreamcasts
or 20 (!!!) Playstation 2s networked, running Linux and Beowolf would have
you a VERY cheap supercomputer, about the same performance as a Cray T90!! ,
but only a FRACTION of the cost!
If anyone knows where I can find info on linux for games consoles (yes I
know there's alot of talk about it but where can I ACTUALLY get it).
Simon Clifford
Surrey, UK
------------------------------
From: "David Ellsworth" <[EMAIL PROTECTED]>
Crossposted-To: rec.video.desktop
Subject: Reading video memory at 18 megabytes/sec
Date: Sat, 22 Apr 2000 13:14:05 GMT
Conventional wisdom says the reading from video memory is very slow and
should be avoided whenever possible.
But sometimes there is no way of avoiding it. Especially when you want to
capture video using an ATI All-in-Wonder Pro. And if you want to capture
full-framed raw YUV 4:2:2 video, you're out of luck. The stream is 18MB/sec,
but the capture works only at 8MB/sec. The inevitable result? Drop-outs, and
lots of them.
Well, I recently discovered GATOS, a Linux program that can display and
capture video on an AIWpro. Like in Win98, it could only capture 45% of a
raw stream. But I didn't give up. I knew there *must* be some way to capture
the whole stream!
Annoyingly, while the P6 has an MTRR "write combining" mode, it does not
have a "read combining" mode! So I tried the next best thing, setting video
memory to "write through". I figured that if I could avoid a cache hit,
everything would be fine. And it worked. I was able to capture the raw,
18MB/sec stream, with no drop-outs and no cache hits. Effective read
combining.
Problem is, Linux evidentally isn't designed to support cached reads from
memory-mapped I/O. It confuses the address in physical memory with virtual
memory, and tries to swap it, and crashes. Often it wouldn't crash the first
time I did a capture, but would crash the second time!
Can you help me? I think I may need to modify the Linux kernel. I've tried
playing with the 1GB / 4GB / 64GB settings, but they don't help. Is there
some page map where I can exclude the range of video memory?
Any hints or ideas would be greatly appreciated!
=====
To reply through email, please remove NO and SPAM from my address.
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Is It Possible To Decompile Kernel Modules?
Date: Sat, 22 Apr 2000 13:28:40 GMT
On Sat, 22 Apr 2000 01:13:34 -0400, Young4ert <[EMAIL PROTECTED]> wrote:
>I am not sure if this is the right NG that I am supposed to post the
>question. Anyway, this may sound awkward; however, I have mistakenly
>deleted some of my own source files that I used to develop some drivers
>for Linux kernel. However, I may be a little bit lucky since I do have
>the object files (not stripped) that I compiled from the source using
>-O2 optimization switch. The question is if it is possible to decompile
>the object files to regain the source.
No, it is not. Object files with debuggin info contain two
basics sets of information:
1) variable names and type info.
2) a mapping between sourcefile names and line numbers and
addresses in executable code.
The files do not contain the actual source code.
>If so, what decompilation utility I should use?
You can see the assembly language with:
objdump --source filename.o
But it will only show you C source code if it can find the
original source files.
Sorry.
--
Grant Edwards grante Yow! Is something VIOLENT
at going to happen to a
visi.com GARBAGE CAN?
------------------------------
From: Robert Sim <[EMAIL PROTECTED]>
Subject: Dual processor pthreads and stdio -- not thread-safe?
Date: Sat, 22 Apr 2000 13:34:19 GMT
Hi,
I have a fresh RH 6.2 installation on a dual-cpu P3.
simra@Chess:[simra] 3>rpm -q glibc
glibc-2.1.3-15
simra@Chess:[simra] 4>ls -l /lib/libpthread*
-rwxr-xr-x 1 root root 289906 Feb 29 16:58
/lib/libpthread-0.8.so*
lrwxrwxrwx 1 root root 17 Apr 17 17:46
/lib/libpthread.so.0 -> libpthread-0.8.so*
simra@Chess:[simra] 5>uname -a
Linux Chess.McRCIM.McGill.EDU 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40
EST 2000 i686 unknown
The following short program works fine on a single processor machine,
but aborts on a dual. I haven't tried it yet w/ open(2) and read(2), so
I'm not sure if it's a libc problem or kernel problem. In any case it's
a serious problem.
btw, if I guard the inside of the while loop with a mutex, the same
problem occurs, so it seems to have something to do with the thread
migrating between processors (if this does indeed occur).
does anyone have any ideas?
/************************************************************************
gcc -Wall -o threadtest -D_REENTRANT threadtest.c
-lpthread
Usage: ./threadtest
***********************************************************************/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#define maxthreads 4
void * runthread(void* args);
int
main(int argc, char ** argv) {
int t;
pthread_t threads[maxthreads];
t=0;
for (t=0; t<maxthreads; t++) {
fprintf(stderr,"Spawning thread %d\n", t);
pthread_create(&threads[t], NULL,
runthread, argv[0]);
}
sleep(10000);
exit(0);
}
void * runthread(void* args) {
char buffer[1024];
while (1) {
FILE* fp=fopen("threadtest.c","r");
if (!fp) {
perror((char*)args);
exit(1);
}
if (!fgets(buffer, 1023, fp)) {
perror("Failed fgets");
exit(1);
}
if (strncmp(buffer, "/*",2)) {
fprintf(stderr, "Failed on *%s*\n",buffer);
abort();
} else fprintf(stderr,"%ld Success..\n",(long)fp);
fclose(fp);
}
pthread_exit(0);
}
--
We ARE as gods and might as well get good at it.
-- Whole Earth Catalog
------------------------------
From: "David Ellsworth" <[EMAIL PROTECTED]>
Subject: DMA memory-to-memory
Date: Sat, 22 Apr 2000 14:03:14 GMT
What is the best way to do a DMA memory-to-memory transfer under Linux? Is
DMA capable of doing transfers upwards of 18 megabytes per second? Can it
copy from video memory to main memory?
If you can answer even one of these questions, I will be very appreciative!
Thanks.
=====
To reply through email, please remove NO and SPAM from my address.
------------------------------
From: [EMAIL PROTECTED] (John McKown)
Subject: Re: LIMITS OF LINUX.........PLEASE HELP
Date: Sat, 22 Apr 2000 09:47:31 -0500
On Wed, 19 Apr 2000 19:34:14 +0200, Mario Klebsch <[EMAIL PROTECTED]> wrote:
>
>TCPs limit is 64K commections per client. :-)
>
What is a "client" in this case. I would have thought that the limit would
be 64K per IP address. So if you had 3 ethernet cards with three different
IP addresses, wouldn't you be able to have 3*64K TCP connections? And wouldn't
that be per IP address. Can two different processes use the same IP/port
combination? I am honestly curious since I am still towards the bottom of
the learning curve.
Thanks,
John
------------------------------
From: [EMAIL PROTECTED] (Michael Kelly)
Subject: make xconfig kernel bug?
Date: 22 Apr 2000 15:19:41 GMT
Anyone know of a bug in make xconfig when
compiling kernels? I'm curious because I
was experimenting with the 2.3.24 kernel
and changed settings and recompiled for
a week or so trying to get udf file system
and CD-RW stuff going, and all of a sudden
every time I tried make bzImage it died
trying to compile main.c! (Just gave
"error 1" with no diagnostic.) I tried
make mrproper to clean things up and ran
make xconfig again and it made no difference.
It's weird! I even exploded the kernel source
tarball and tried again from scratch and got the
same error. Seems strange.
TIA
--
Mike
--
"I don't want to belong to any club that would have *me* as a member!"
-- Groucho Marx
------------------------------
From: Christian Reiser <[EMAIL PROTECTED]>
Subject: end of a device-file
Date: Sat, 22 Apr 2000 17:51:50 +0200
Hi,
i am about to write the 1001st driver for controlling a hd44780
LCD-Controller-Chip throug the parallel port. I also want to implement
reading from the Display. So i just implementet a routine dev_read which
returns (independent from the given Parameters) 43 Chars:
20 Text, 1 Return (\n), 20 Text, 1 Return, 1 binary null (\0)
I tought every programm would interpret the binary null as EndOfFile,
but a cat /dev/lcd only gets:
123456789012345678901234567890
1234567890
123456789012345678901234567890
1234567890
123456789012345678901234567890
1234567890
[...]
The binary 0 at the end is there, hexdump and mc claim this. Now i do
not know what to do. My routine looks as follows:
int dev_read (struct file *file, char *buf, size_t count, loff_t
*unknown)
{
struct s_lcd *lcd = &lcds[MINOR(file->f_dentry->d_inode->i_rdev)];
#ifdef DEBUG
printk ("lcd: dev_read; unknown is: %x\n", unknown);
#endif
return lcd_copyContent(lcd,buf, count);
};
lcd_copyContent copys the content from the lcd to buf, and returns the
number of copied bytes. if count is to small it simply returns -1.
And my parameter unknown seems to be 0 every time ! Who can help me out
?
Ciao
Christian
------------------------------
From: Badrinath Venkatachari <[EMAIL PROTECTED]>
Subject: read from kernel
Date: Sat, 22 Apr 2000 12:18:24 -0700
Hi,
Is there a way that I can issue read requests for a file from within
the kernel (to read it sequentially), instead of having a user process
ask for data.
What I want to do is to have a user process opening a file and
periodically read from the buffer (associated with the file) instead of
requesting data ? The kernel would just get the data beforehand and keep
it in a buffer for the client to read.
thanks and regards
badri
------------------------------
From: "Jan Lund Kristensen" <[EMAIL PROTECTED]>
Subject: Far pointer
Date: Sat, 22 Apr 2000 17:48:35 GMT
Hi,
How can I make a far pointer for direct memory access?
Like using MK_FP macro in C++ for MS-DOS.
Greetings
Jan
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: DMA memory-to-memory
Date: Sat, 22 Apr 2000 18:44:12 +0200
"David Ellsworth" <[EMAIL PROTECTED]> writes:
>What is the best way to do a DMA memory-to-memory transfer under Linux?
Probably not using DMA at all. I never investigated this, but a copy
loop written in assembler should run out of almost every first level
cache on todays processors. So the available memory bandwith should be
available for the copy operations.
The only exception would be, if you have other things to do for the
CPU, which can run out of first or second level cache.
Using DMA for memory to memory transfers would also make sense on a
machine with a swichted backplane like the sun ultra. Some weeks ago,
I have read about an intel based multiprocessor system with a switched
backplane running some verion of NT. But the performace improvements
did not justify the change in architecture, so I guess, it will stay
an exotic architecture for intel processors.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
------------------------------
From: "Clint Box" <[EMAIL PROTECTED]>
Subject: getting started...
Date: Sat, 22 Apr 2000 19:28:55 GMT
Hey,
I've purchased "Design and Implementation of 4.4BSD" and it's not a starter
book. It's very informative but I think I need to get a better understand
of OS functions. Can anyone suggest a good book, or video, or even a simple
OS that would simplify what an OS can and should do?
Clint
------------------------------
From: Tony Davis <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.sys.unisys
Subject: Re: Linux Ports
Date: Sat, 22 Apr 2000 20:53:09 +0100
Hi Pat,
are you SURE its a U5000 ?? wow! i did not think there were any around
that survived the crusher !
The 2 biggest problems you are going to hit, are :
1) the BIOS will be so old, that it will NOT support any half decent disks
( not more than 1GB anyway )
2) these old boxes ( like the U6000/35 I was asked about the other week )
, do not have, or support, a VGA console, and I
understand that the commercial "distributions" you see packaged for
$20 or so, or given away, will need that to install via
an "X" like gui. ( even then , they don't support less well known VGA
chipsets/cards ).
Sorry. Your best bet is to try to get a second-user Pentium PC, with a
well known VGA card, or chipset on the Mboard.
With something like that, you can easily upgrade disk/memory/add-in cards,
as your budget allows.
Regards, Tony davis.
Pat Finnegan wrote:
> I have recently acquired (actually a few months ago now, I guess) a
> Unisys U5000 minisystem. Running off of a 68020 at 25MHz, it may not
> be the fastest system out there, but I would still like to put it to
> some use.
> Does anyone know of a Linux Port that'll work with it? From what
> research I've done, it looks bleak, however; I might be willing to
> take on the task if anyone has good hardware specs (I'd work on
> porting either uClinux or m68k - the Amiga port, probably, to it) that
> they could send me or point me towards. I think I'd rather port the
> 2.0 branch rather than a newer branch, though, so I might actually be
> able to finish it this year ;) - I am attending college now so my time
> is kinda limited. If anyone else could lend a hand or offer
> information, etc. please email me.
>
> Thanks!
>
> -- Pat Finnegan, Hardware revivalist
------------------------------
From: [EMAIL PROTECTED] (William Burrow)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting our compiler to Linux
Date: 22 Apr 2000 19:54:42 GMT
Reply-To: [EMAIL PROTECTED]
On Fri, 21 Apr 2000 20:08:11 GMT,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>There is a GNU Modula 2 compiler. I've never used it so I can't vouch for
>any of its attributes such as installation ease, completeness, etc.
My recollection is that it is dead, but for the OS/2 crowd so desperate
for a native compiler that they resurrected it somewhat. Check the
comp.lang.modula2 archives on deja (if deja still does newsgroups, they
seem to be confused about why they exist last I looked).
Stony Brook and XDS are the only two Modula-2 compilers at the top of
the heap. Both are commercial. GPM and Mocka are not bad and are
available for Linux, but are not in the same league.
It would be nice to have an object oriented M2 compiler that produced
Windows and Unix code from the same source, but I'm not sure if that is
a goal Mr. Black has in mind.
--
William Burrow -- New Brunswick, Canada o
Copyright 2000 William Burrow ~ /\
~ ()>()
------------------------------
** 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
******************************