Linux-Development-Sys Digest #629, Volume #7 Sat, 26 Feb 00 13:13:16 EST
Contents:
Linux or Windows ("RH")
Re: Linux or Windows ("Frank V. Castellucci")
BUS ERROR WITH MMAP (David)
BUS ERROR WITH MMAP (David)
How can I change a Frame of process ? (David)
BUS ERROR WITH MMAP (David)
BUS ERROR WITH MMAP (David)
How can I change a Frame of process ? (David)
Re: Does linux support DIRECT I/O? (Robert Kaiser)
Re: Build your own Linux OS (Christian Leber)
Re: Binary compatibility: what kind of crack are they smoking? (Miquel van
Smoorenburg)
Re: Binary compatibility: what kind of crack are they smoking? (Cliff Wagner)
the init of wait queue? (Weiguang Shi)
Re: Linux or Windows (R.M)
Re: 2.2.x SMP and DK440LX issues (Dmitri A. Sergatskov)
Re: 2.2.x SMP and DK440LX issues (Rob Komar)
----------------------------------------------------------------------------
From: "RH" <[EMAIL PROTECTED]>
Crossposted-To: 3dfx.linux.apps.other
Subject: Linux or Windows
Date: Thu, 24 Feb 2000 14:35:02 -0000
I am debating wheather to run Linux on my computer or to stick with windows.
I know very little about linux and want to know which is best. I want to be
able to run it on the same computer as windows. Help please.
RH
[EMAIL PROTECTED]
Visit our home page at www.pwr.org.uk
------------------------------
Date: Sat, 26 Feb 2000 07:56:00 -0500
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Subject: Re: Linux or Windows
RH wrote:
>
> I am debating wheather to run Linux on my computer or to stick with windows.
> I know very little about linux and want to know which is best. I want to be
> able to run it on the same computer as windows. Help please.
> RH
> [EMAIL PROTECTED]
> Visit our home page at www.pwr.org.uk
Run both and make a decision based on your requirements for an operating
system and applications.
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: BUS ERROR WITH MMAP
Date: Sat, 26 Feb 2000 14:31:31 GMT
My code is:
struct SHARED_ZONE
{
int data ;
...
} *SHARED_ZONE ;
...
int fd_shmem = open( "./TP" , O_RDWR | O_CREAT , 0777 ) ;
if ( fd_shmem == -1 )
{
perror( "OPEN SH_MEM" ) ;
exit( -1 ) ;
}
if ( (SHARED_ZONE= (struct DATA_2_SHARE *)
mmap( 0 , sizeof( struct DATA_2_SHARE ) ,
PROT_READ | PROT_WRITE , MAP_SHARED ,
fd_shmem , 0 )) == MAP_FAILED )
{
perror( "MMAP" ) ;
exit( -1 ) ;
}
SHARE_ZONE -> data = 0 ;
I recive an BUS ERROR when SHARE_ZONE -> data = 0 execute.
why ?
What means this error ?
THANKS,
DTM
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: BUS ERROR WITH MMAP
Date: Sat, 26 Feb 2000 14:31:31 GMT
My code is:
struct SHARED_ZONE
{
int data ;
...
} *SHARED_ZONE ;
...
int fd_shmem = open( "./TP" , O_RDWR | O_CREAT , 0777 ) ;
if ( fd_shmem == -1 )
{
perror( "OPEN SH_MEM" ) ;
exit( -1 ) ;
}
if ( (SHARED_ZONE= (struct DATA_2_SHARE *)
mmap( 0 , sizeof( struct DATA_2_SHARE ) ,
PROT_READ | PROT_WRITE , MAP_SHARED ,
fd_shmem , 0 )) == MAP_FAILED )
{
perror( "MMAP" ) ;
exit( -1 ) ;
}
SHARE_ZONE -> data = 0 ;
I recive an BUS ERROR when SHARE_ZONE -> data = 0 execute.
why ?
What means this error ?
THANKS,
DTM
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: How can I change a Frame of process ?
Date: Sat, 26 Feb 2000 14:31:32 GMT
HI,
I am triying to make a SO simulation for University.
My problem is when I try change a Frame of process, i.e., I want to
unmap the TEXT CODE of process AND MAP IT in MY OWNER memory direction
(of course rounded to PAGESIZE) TO EMULATE a SYSYEM MEMORY.
I have thinked :
unmap( direction of process , PAGESIZE ) ;
map ( NEW DIRECTIOR ... fd_kmem ) ;
PROBLEM: I had never used /dev/kmem, and I am not sure how does it
works.
Do I access to PROCESS VIRTUAL MEMORY OR ONLY KERNEL MEMORY ?
IF I access TO kernel memory, Can I change PAGE_DIRECTORY_ENTRY (I am
working with Intel computer) ?
THANKS in advance,
DTM
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: BUS ERROR WITH MMAP
Date: Sat, 26 Feb 2000 14:46:57 GMT
My code is:
struct SHARED_ZONE
{
int data ;
...
} *SHARED_ZONE ;
...
int fd_shmem = open( "./TP" , O_RDWR | O_CREAT , 0777 ) ;
if ( fd_shmem == -1 )
{
perror( "OPEN SH_MEM" ) ;
exit( -1 ) ;
}
if ( (SHARED_ZONE= (struct DATA_2_SHARE *)
mmap( 0 , sizeof( struct DATA_2_SHARE ) ,
PROT_READ | PROT_WRITE , MAP_SHARED ,
fd_shmem , 0 )) == MAP_FAILED )
{
perror( "MMAP" ) ;
exit( -1 ) ;
}
SHARE_ZONE -> data = 0 ;
I recive an BUS ERROR when SHARE_ZONE -> data = 0 execute.
why ?
What means this error ?
THANKS,
DTM
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: BUS ERROR WITH MMAP
Date: Sat, 26 Feb 2000 14:46:57 GMT
My code is:
struct SHARED_ZONE
{
int data ;
...
} *SHARED_ZONE ;
...
int fd_shmem = open( "./TP" , O_RDWR | O_CREAT , 0777 ) ;
if ( fd_shmem == -1 )
{
perror( "OPEN SH_MEM" ) ;
exit( -1 ) ;
}
if ( (SHARED_ZONE= (struct DATA_2_SHARE *)
mmap( 0 , sizeof( struct DATA_2_SHARE ) ,
PROT_READ | PROT_WRITE , MAP_SHARED ,
fd_shmem , 0 )) == MAP_FAILED )
{
perror( "MMAP" ) ;
exit( -1 ) ;
}
SHARE_ZONE -> data = 0 ;
I recive an BUS ERROR when SHARE_ZONE -> data = 0 execute.
why ?
What means this error ?
THANKS,
DTM
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: How can I change a Frame of process ?
Date: Sat, 26 Feb 2000 14:47:08 GMT
HI,
I am triying to make a SO simulation for University.
My problem is when I try change a Frame of process, i.e., I want to
unmap the TEXT CODE of process AND MAP IT in MY OWNER memory direction
(of course rounded to PAGESIZE) TO EMULATE a SYSYEM MEMORY.
I have thinked :
unmap( direction of process , PAGESIZE ) ;
map ( NEW DIRECTIOR ... fd_kmem ) ;
PROBLEM: I had never used /dev/kmem, and I am not sure how does it
works.
Do I access to PROCESS VIRTUAL MEMORY OR ONLY KERNEL MEMORY ?
IF I access TO kernel memory, Can I change PAGE_DIRECTORY_ENTRY (I am
working with Intel computer) ?
THANKS in advance,
DTM
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: Does linux support DIRECT I/O?
Date: 26 Feb 2000 11:58:05 GMT
In article <[EMAIL PROTECTED]>,
Pat Kling <[EMAIL PROTECTED]> writes:
> Thank you for the information. This is indeed what I was looking for.
> Did the "gods" propose an alternative to this ubiquitous method?
Well, the official alternative seems to be to allocate a buffer in
kernel space and then map it into user space. This way a user program
can also access DMAed data directly.
The big problem I have with that is that it calls for a device-specific,
non-standard API, i.e. the DMA functionality has to be accessed through
some cryptic ioctl()s. Applications using such a facility will always
have to be specifically written for the particular driver they talk to,
i.e. you can't have a driver that implements, for example, the standard
read() and write() calls using DMA.
> Are you planning on supporting your common sense patch?
I have been doing so (with as little spare time as I have for this)
since kernel 2.0.29. I am also planning to release a module version
of this patch real soon, so people won't have to patch their kernels.
Ultimately, however, this should go into the kernel. Maybe if
a large enough number of people start using it, it might convince
the "gods" to re-think their descision.
FWIW, I have heard rumors here and there that some kind of user-space
DMA functionality will be in the 2.4.x kernel, not sure if this is
really true though (anyone?)
Cheers
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Klein-Winternheim / Germany
------------------------------
From: Christian Leber <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: Build your own Linux OS
Date: Sat, 26 Feb 2000 16:08:57 +0100
Am Sat, 26 Feb 2000 08:55:10 +0100, meinte Julius Longauer
<[EMAIL PROTECTED]>
>"Linux From Scratch HOWTO" is probably the doc your are looking for.
>Take
>a look at
>http://www.linuxdoc.org/HOWTO/LFS-HOWTO.html
I�ve got a Problem compiling some packages statically on my System
(glibc 2.1.3 + gcc 2.95.2), for example the message when i try to
compile sed:
---
gcc -g -O2 -static -o sed sed.o compile.o execute.o utils.o
../lib/libsed.a
/usr/lib/libc.a(regex.o)(.data+0x4): multiple definition of
`re_max_failures'
../lib/libsed.a(regex.o):/home/ijuz/LFS/stage1/sed-3.02/lib/regex.c:194:
first defined here
collect2: ld returned 1 exit status
make[2]: *** [sed] Error 1
make[2]: Leaving directory `/home/ijuz/LFS/stage1/sed-3.02/sed'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ijuz/LFS/stage1/sed-3.02'
make: *** [all-recursive-am] Error 2
---
Somebody else was able to compile it on a glibc 2.0.7, ich could also
install such a System but this is not my aim, is there a Bug or it is a
Problem on my System?
With textutils etc i get a similar Message.
--
" ...weil...um zum Satanismus zurueckzukommen..."
(Religionsdiskussion im dem Ethikunterricht)
------------------------------
From: [EMAIL PROTECTED] (Miquel van Smoorenburg)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: 26 Feb 2000 15:57:44 GMT
In article <[EMAIL PROTECTED]>,
Mario Klebsch <[EMAIL PROTECTED]> wrote:
>That would be ok, if glibc5, glibc2 or glibc2.1 would be the only
>library required by those applications. But almost every Applications
>requires e.G. the X11 libs, and althoug theit interface changed with
>the libc, too, their version number did not.
You must be kidding, or you are using a weird system. I can run
libc5, glibc 2.0 and glibc 2.1 X based applications at the same
time without any problems.
Mike.
--
"dhbgr zr ba guvf bar - biretnna bc Rkpunatr vf rra jvwf orfyhvg" -- ZnepbU.
(punatrq gb ebg13 nsgre frireny frevbhfyl fbhaqvat guerngf).
------------------------------
From: [EMAIL PROTECTED] (Cliff Wagner)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: 26 Feb 2000 16:23:18 GMT
Reply-To: [EMAIL PROTECTED]
On 24 Feb 2000 22:36:46 GMT, Colin Watson typed something like:
>In article <[EMAIL PROTECTED]>,
>Adam Ierymenko <[EMAIL PROTECTED]> wrote:
>>Mario Klebsch wrote:
>>> There is no such thing as a Linux OS! There is RedHat Linux,
>>> SUSE-Linux, debian Linux, and lots of other. Face it, Linux already
>>> has fragmented.
>>>
>>> This will kill Linux, because if you want to support Linux, you have
>>> to support more than a hand foll of operating systems, that only
>>> differ slightly. And although you officially are supporting Linux, you
>>> are not supporting all thos linux systems, that are not just installed
>>> from CD, but self compiled.
>>
>>Actually, if all the distros would just standardize on one
>>package manager format, it would be OK. Right now it's
>>RPM and DPKG... or maybe make DPKG and RPM able to
>>install each others' packages?
>
>alien.
>
>Not that this solves the problem; the different distributions have
>different filesystem layouts. alien does (with the -g option) let you
>perform the unpack and build stages separately, though, which gives you
>the chance to rearrange things yourself.
>
>The libraries problem remains, though, as dependencies can't sensibly be
>translated between distributions (even forgetting about package
>formats). Modulo bugs, open source does generally solve this.
Actually, as far as I've seen, alien does a decent job of checking
for library sanity.
I tried to install a .deb package today, which required older
gnome libs, which I didn't feel like putting on my system.
Out of curiosity, I tried to alien the rpm file, which searched
out the libraries it needed, after which point, it told me it
couldn't convert the rpm file (which is the action I'd want from
it).
In my experience, a debian system using alien can install
almost anything in binary format, with a somewhat sane layout.
(given, not perfect by any means).
-c-
--
Cliff Wagner ([EMAIL PROTECTED])
Visit The Edge Zone: http://www.edge-zone.net
"Man will Occasionally stumble over the truth, but most
of the time he will pick himself up and continue on."
-- Winston Churchill
------------------------------
From: Weiguang Shi <[EMAIL PROTECTED]>
Subject: the init of wait queue?
Date: Sat, 26 Feb 2000 09:57:32 -0700
Hi, there:
When I was reading the source code of Linux kernel 2.0.38, the
initialization of the wait queue puzzled me. Here is the code:
=================================================================
11 struct wait_queue {
12 struct task_struct * task;
13 struct wait_queue * next;
14 };
15
16 #define WAIT_QUEUE_HEAD(x) ((struct wait_queue *)((x)-1))
17
18 static inline void init_waitqueue(struct wait_queue **q)
19 {
20 *q = WAIT_QUEUE_HEAD(q);
21 }
22
==================================================================
"/usr/src/linux/include/linux/wait.h" line 1 of 43 --2%-- col 1
Line 20 should be equivalent to the sentence below:
*q = (struct wait_queue*)(q-1);
Here the content of q is set to the address right before q but which has
not been initialized to anything. There is even no gurantee this is a
valid address for the process. Why should this be done? What's the effect?
Thank you.
Weiguang Shi | E-mail: [EMAIL PROTECTED]
Department of Computing Science | http://www.cs.ualberta.ca/~wgshi
University of Alberta | Office: CAB 481
Edmonton, AB, Canada, T6G 2H1 | (O) (780)492-3927
------------------------------
From: R.M <[EMAIL PROTECTED]>
Crossposted-To: 3dfx.linux.apps.other
Subject: Re: Linux or Windows
Date: Sat, 26 Feb 2000 18:25:43 +0100
>I am debating wheather to run Linux on my computer or to stick with windows.
>I know very little about linux and want to know which is best. I want to be
>able to run it on the same computer as windows. Help please.
Hi,
Put two hard disk IDE in your computer. One for Windows, one for Linux. It is a
fine solution.
After a while you will prefer Linux, sure !
Sincerely
Fred
------------------------------
From: [EMAIL PROTECTED] (Dmitri A. Sergatskov)
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2.2.x SMP and DK440LX issues
Date: 26 Feb 2000 17:57:15 GMT
On Sat, 26 Feb 2000 00:42:23 -0800, Robert Redelmeier <[EMAIL PROTECTED]> wrote:
>Dmitri A. Sergatskov wrote:
>> > the LX is. Is there some `wbinvd` being issued at SMP task-switch?
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> I do not know.
>
>`wbinvd` is a frightening (priviliged) instruction that causes the
>long-suffering CPU to stop, and write out _all_ modified data cache
>lines, and invalidate them. Takes forever to execute. IIRC, this
>is a terrible SMP hack that has been replaced by MESI cache
>architecture.
>
>Your BIOS/LX might be inserting this somehow, or Linux might if
>it doesn't recognize MESI capabilities in the LX.
>
Thanks for info. I still do not know if 'wbinvd' is being issued.
>> Alan Cox thinks that I have a problem with scheduling and the task get
>> (excessively) bounced between two CPUs. So, I guess, the system time
>> does come from scheduler.
>
>Why? IIRC, CPU task migration is inhibited by a fairly heavy penalty
>in the scheduler. If you run two copies of the task, do you still
>see the same system overhead?
>
Yes. I do not see much difference if I run 2 tests at the same time.
I will try to re-compile kernel with increased penalty and see if it
changes anything.
Another option as I mentioned before is to install 2.0.36 kernel -
this computer used to be fine with RH5.2.
Unfortunately, this computer is also an NFS server, so its downtime
is quite expensive which limits experimentation time...
>-- Robert
Sincerely,
Dmitri.
------------------------------
From: Rob Komar <[EMAIL PROTECTED]>
Subject: Re: 2.2.x SMP and DK440LX issues
Crossposted-To: comp.os.linux.hardware
Date: Sat, 26 Feb 2000 00:07:04 -0800
In comp.os.linux.development.system Dmitri A. Sergatskov <[EMAIL PROTECTED]>
wrote:
> Hello,
> I updated multiple dual-CPU computers to RedHat 6.1 and recently
> noticed that the computer built around Intel DK440LX (2X 333 MHz P-II)
> motherboard has some "problem" in SMP mode. All benchmarks I tried
> (MATLAB bench() or custom compiled Fortran code) are running
> significantly (almost twice, but varies) slower in SMP mode than in UP
> mode. In UP mode the numbers are the same as with similar system built
> on 440BX motherboard (also 2X333Mhz) and the same as they used to be
> with RedHat 5.2 (and earlier) and 2.0.x kernels.
> The simplest "benchmark" I tried is the following trivial loop:
> double precision x,y,z,sum
> integer i,j,k
> sum = 0.0d0
> do i = 1, 1000
> do j = 1, 1000
> do k = 1, 100
> sum = sum + real(i)*real(j)/real(k)
> end do
> end do
> end do
> write (6,*) sum
> end
> On LX machine 'time -v' gives: 11.5 sec. user, 5.5 sec. system (18 elapsed)
> and approx 100 page faults (in case it matters), on BX the same binary
> would result in: 11.5 sec. user, 0.1 sec system (11.5 elapsed)and also
> 100 page faults.
> The difference is even worse for memory intensive code.
Hi,
I have the same motherboard running dual 233 MHz CPUs, and here's what I get for
the above program:
15.650u 0.010s 0:15.65 100.0% 0+0k 0+0io 110pf+0w
The user time scales approximately with clock speed (maybe a little better
in my case), yet the system time is negligible for me. Here's my cpuinfo
(for one processor; the other's the same):
robpc1>cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 3
model name : Pentium II (Klamath)
stepping : 3
cpu MHz : 233.140099
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov mmx
bogomips : 232.65
I'm running a pretty well stock Slackware 7 system with a 2.2.14 kernel in SMP mode
(with no RedHat kernel patches).
Apart from your having more flags, the only other difference is that you're using
Deschutes processors and I'm using Klamath (what the board was originally designed
for). Could using a Deschutes processor be the source of the problem? RedHat
Kernel patches?
Cheers,
Rob Komar
------------------------------
** 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
******************************