Linux-Development-Sys Digest #628, Volume #7     Sat, 26 Feb 00 07:13:11 EST

Contents:
  Re: Binary compatibility: what kind of crack are they smoking? (Albert Ulmer)
  Re: complex math in a device driver (Bryan Hackney)
  Re: Build your own Linux OS (Kevin Hayes)
  Re: memory allocation . (Bryan Hackney)
  remapping . (Nilesh Patel)
  Re: 2.2.x SMP and DK440LX issues (Robert Redelmeier)
  Re: 2.2.x SMP and DK440LX issues ("Dmitri A. Sergatskov")
  Re: 2.2.x SMP and DK440LX issues (Robert Redelmeier)
  Re: Build your own Linux OS (Julius Longauer)
  Re: Memory Mapping problem (pramodh mallipatna)
  Re: 2.2.x SMP and DK440LX issues (jwk)
  Re: bzImage and zImage error (Markus Kossmann)
  unable to open a file ("ChoongHwan Lee")
  Re: complex math in a device driver (Oliver Bandel)
  Re: memory allocation . (Ralf Render)
  Re: Binary compatibility: what kind of crack are they smoking? (Mario Klebsch)
  Re: Binary compatibility: what kind of crack are they smoking? (Mario Klebsch)
  Re: Binary compatibility: what kind of crack are they smoking? (Mario Klebsch)

----------------------------------------------------------------------------

From: Albert Ulmer <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: Sat, 26 Feb 2000 04:10:49 +0000

Mario Klebsch wrote:
> >> SUSE, Caldera,... They all claim to be Linux, but in fact are
> >> different OSes.

> >Nonsense, they all cater the diverse needs of various users. In my view
> >that's the main point about the whole open source movement: CHOICE! It
> >is good to be different!
 
> The absence of the ABI destroys the choice. If you are not running
> RedHat or SUSE Linux, you really are in trouble, today. However, the
> degree of trouble varies from distribution to distribution.

Very true. I'm running Debian and rest assured, I have no trouble at
all. There is not one single Linux program, be it available in binary or
source,  that I can not run on my system. Period. No trouble today, none
tomorrow.

------------------------------

From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: complex math in a device driver
Date: Fri, 25 Feb 2000 22:12:52 -0600

Andreas Jaeger wrote:
> 
[...]
> 
> You can't use any floating point in the kernel at all.  No chance
> AFAIK.  You have to solve this differently.  Are you sure that this
> cannot done in userspace?
> 
> Andreas
> --
[...]

There has to be a way. I think the problem is that the kernel does not
save FP state - you would have to figure out how to push and pop FP state,
and make absolutely sure your code is atomic.

Now, the fact that this is not done and apparently never has been done would
seem to indicate much smarter people than we have never had an absolute need
for such.


-- 
                                 Bryan Hackney / BHC / [EMAIL PROTECTED]
                                        http://www.FreeClassAds.com/
                                        http://bhconsult.com/
                                        http://bhconsult.com/bh/pgp.key

------------------------------

From: [EMAIL PROTECTED] (Kevin Hayes)
Crossposted-To: comp.os.linux.setup
Subject: Re: Build your own Linux OS
Reply-To: [EMAIL PROTECTED]
Date: 26 Feb 2000 15:12:05 +1100

On Sat, 26 Feb 2000 01:30:26 GMT, Michael Ransburg <[EMAIL PROTECTED]> wrote:
>Is there a HOWTO or any other sort of documentaion on how to build your
>own Linux System? I suppose that I'm not the first one interested in
>this, so I guess there should be some documentation to get me started.

Checkout www.diylinux.com...

>I suppose it would be easiest to have a running linux distribution with
>all the necessary tools to compile the necessary libraries (and the
>kernel of course) to get a minimal bootable partition.

Essential... 

>Well, I know it's much work and I don't want to start from one of the
>existing mini distributions. Any references to HOWTO's, books, or any
>other sort of documentation about this topic will be highly appreciated
>:)
>
>thanks
>mike
>-- 
>Curious? Look at http://www.tux.org/~daneel/


-- 
Kevin Hayes
Freshwater, Australia


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
======== Over 73,000 Newsgroups = Including  Dedicated  Binaries Servers =======

------------------------------

From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: memory allocation .
Date: Fri, 25 Feb 2000 22:19:45 -0600

[...]

> > > Try  get_free_pages(GFP_KERNEL, 3).
> > >
> > > nilesh patel <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
> > > [EMAIL PROTECTED]
> > > >     hi ,
> > > >          how do you allocate a 64 K contiguous real memory for PCI
> > > > devices ?
> > > >
[...]

Be aware, in my experience, large kernel memory requests are less likely to
succeed the longer the system has been running. The last time I stressed this
was with a 2.0 kernel.

The part about PCI devices is apparently irrelevant. Something may be missing
in the question.

-- 
                                 Bryan Hackney / BHC / [EMAIL PROTECTED]
                                        http://www.FreeClassAds.com/
                                        http://bhconsult.com/
                                        http://bhconsult.com/bh/pgp.key

------------------------------

From: Nilesh Patel <[EMAIL PROTECTED]>
Subject: remapping .
Date: Sat, 26 Feb 2000 10:31:36 +0530

hi ,
     i have a pci device which is to be written to . now , when  i do a
kmalloc , i get a virtual memory area . does this memory area have to
be ioremapped before using it . Linus says in /IO-mapping.txt that any
PCI memory area which is above 1meg , has to be remapped .. but the
area i get as a result of the kmalloc is in real memory . Do i need to
remap the same ?

thanks,
nilesh .


------------------------------

From: Robert Redelmeier <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2.2.x SMP and DK440LX issues
Date: Fri, 25 Feb 2000 23:26:50 -0800

Dmitri A. Sergatskov wrote:

> 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.

A very interesting question.  I am staggered that a simple CPU-bound 
task like this could consume 5.5s system time.  Could it be that real()
call?  IIRC, my heavily CPU bound `cpuburn` asm never consumes much
system time at all.  Even more odd that the BX isn't affected, but
the LX is.  Is there some `wbinvd` being issued at SMP task-switch?

-- Robert  author `cpuburn`  http://users.ev1.net/~redelm

------------------------------

From: "Dmitri A. Sergatskov" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2.2.x SMP and DK440LX issues
Date: Fri, 25 Feb 2000 23:01:18 -0700

On Fri, 25 Feb 2000, Robert Redelmeier wrote:

> A very interesting question.  I am staggered that a simple CPU-bound 
> task like this could consume 5.5s system time.  Could it be that real()
> call?  IIRC, my heavily CPU bound `cpuburn` asm never consumes much
> system time at all.  Even more odd that the BX isn't affected, but
> the LX is.  Is there some `wbinvd` being issued at SMP task-switch?
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I do not know.

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. 

The question remains why does it show up on LX board only (I have SMP FX, 
BX and GX around and they are all OK).


> 
> -- Robert  author `cpuburn`  http://users.ev1.net/~redelm
> 

Dmitri.



------------------------------

From: Robert Redelmeier <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2.2.x SMP and DK440LX issues
Date: Sat, 26 Feb 2000 00:42:23 -0800

Dmitri A. Sergatskov wrote:
> On Fri, 25 Feb 2000, Robert Redelmeier wrote:
> > A very interesting question.  I am staggered that a simple CPU-bound
> > task like this could consume 5.5s system time.  Could it be that real()
> > call?  IIRC, my heavily CPU bound `cpuburn` asm never consumes much
> > system time at all.  Even more odd that the BX isn't affected, but
> > 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.

> 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? 

-- Robert

------------------------------

From: Julius Longauer <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: Build your own Linux OS
Date: Sat, 26 Feb 2000 08:55:10 +0100

Michael Ransburg wrote:
> 
> Is there a HOWTO or any other sort of documentaion on how to build your
> own Linux System? I suppose that I'm not the first one interested in
> this, so I guess there should be some documentation to get me started.
> 
> I suppose it would be easiest to have a running linux distribution with
> all the necessary tools to compile the necessary libraries (and the
> kernel of course) to get a minimal bootable partition.
> 
> Well, I know it's much work and I don't want to start from one of the
> existing mini distributions. Any references to HOWTO's, books, or any
> other sort of documentation about this topic will be highly appreciated
> :)
> 

"Linux From Scratch HOWTO" is probably the doc your are looking for.
Take
a look at
http://www.linuxdoc.org/HOWTO/LFS-HOWTO.html

Julius

------------------------------

From: pramodh mallipatna <[EMAIL PROTECTED]>
Subject: Re: Memory Mapping problem
Date: 26 Feb 2000 08:03:24 GMT

Hi,

Thanks for the suggestion.

This almost works...but not quite.
The point is, the physical address what we get from 

phys_to_virt(usr_to_phys(volatile void *address))

is somewhere in the middle of the actual physical page 
(something between 1000-1500 bytes ahead of the actual physical pointer).

I just tried 

return pte_page(*pte); 

instead of 

return((void *) ( ( pte_page(*pte) +
        (((unsigned long)address)&(PAGE_SIZE-1))) & ~PAGE_OFFSET));

In this case, the actual physical pointer is ahead of the pointer I get from 
this. So, if I print a page, I find my page to start somewhere from the
middle of this page.

How do I compute the actual offset? I looked at the macros in io.h
and got confused with the arithmetic there.

Thanks,
Pramodh


Robert Kaiser <[EMAIL PROTECTED]> wrote:

> static inline void *usr_to_phys(volatile void *address)
> {
>     pgd_t * pgd;
>     pmd_t * pmd;
>     pte_t * pte;

>     pgd = pgd_offset(current->mm, (unsigned long)address);
>     pmd = pmd_offset(pgd, (unsigned long)address);
>     pte = pte_offset(pmd, (unsigned long)address);

>     return((void *) ( ( pte_page(*pte) +
>           (((unsigned long)address)&(PAGE_SIZE-1))) & ~PAGE_OFFSET));
> }



------------------------------

From: [EMAIL PROTECTED] (jwk)
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2.2.x SMP and DK440LX issues
Date: 26 Feb 2000 08:10:38 GMT
Reply-To: [EMAIL PROTECTED]

On Sat, 26 Feb 2000 00:42:23 -0800, Robert Redelmeier
<[EMAIL PROTECTED]> wrote:
>Dmitri A. Sergatskov wrote:
>> 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? 
>
There has recently been discussion on the kernel mailing list that this
penalty is in fact not severe enough. This has been corrected in the
last 2.3.4x kernels, IIRC.

Jurriaan


-- 
"And remember: Evil will always prevail, because Good is dumb."
        Spaceballs
Linux 2.2.14 SMP up 12:34 5 users load av: 0.00 0.02 0.00

------------------------------

From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: bzImage and zImage error
Date: Sat, 26 Feb 2000 08:15:53 +0100

GriffD2000 wrote:
> 
> I have kernel 2.2.14 and when doing a "make zImage" or "make bzImage" i run
> into the following problem.  Skipping most of the messages, i come to this:
> 
> make[1]: Entering directory `/usr/src/linux-2.0.35/arch/i386/lib'
> make all_targets
> make[2]: Entering directory `/usr/src/linux-2.0.35/arch/i386/lib'
> gcc -D__KERNEL__ -I/usr/src/linux-2.0.35/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer  -pipe -fno-strength-reduce -m486 -DCPU=486   -c -o
> checksum.o checksum.c
> make[2]: Leaving directory `/usr/src/linux-2.0.35/arch/i386/lib'
> make[1]: Leaving directory `/usr/src/linux-2.0.35/arch/i386/lib'
> checksum.c:200: redefinition of 'csum_partial_copy'

> 
> Before this, I did a make dep, clean, and before that even a mrproper.  Does
> anyone know what is causing this problem, and how can i fix it?

Use clean sources . You did unpack the 2.2.14 sources into the 2.0.35
source directory .
So there is a checksum.c from 2.0.35 in your 2.2.14 sources. But in
2.2.14 checksum.c doesn't exist anymore.
--
Markus Kossmann                                    
[EMAIL PROTECTED]

------------------------------

From: "ChoongHwan Lee" <[EMAIL PROTECTED]>
Subject: unable to open a file
Date: Sat, 26 Feb 2000 19:05:58 +0900

  I'm programming with gcc under Linux Redhat 6.0, Kernel 2.2.5-15 on a
sparc.

  My program tries to open a file, but can't open it.

  I tried both C standard function 'fopen' and System call 'open', but these
calls made errors with errorno = 2

- errorno 2 may represent 'No such file or directory'.

  But, I'm sure that the file which I want to open exists. In order to
confirm existence, I made another program which opens that file,

and it works well.

  In addition to this, I copy source program and data file to another
directory, and it works well.

  And, this program operates well in SunOS, and another Linux system.

  So, I'm sure that my program has no error, if my program has any errors,
it might fail to open that data file in tests.

  Surely, there is no mistake about permission or file with path.

  I don't know why my program can't open a data file, in that specific one
circumstance.

  I've heard that the server - SPARC - had undergone a power failure without
any preparations, and this stoppage brought Linux system

to make errors on i-nodes. It may be a factor of the error, and I suspect
Linux kernel.

  Is there any bug report about this kind of error?

  Please help me...

--



       ChoongHwan Lee
       [EMAIL PROTECTED]



------------------------------

From: Oliver Bandel <[EMAIL PROTECTED]>
Subject: Re: complex math in a device driver
Date: 26 Feb 2000 01:51:31 +0100


Dan Miller <[EMAIL PROTECTED]> wrote:
> I need to access some math library function in my device driver.  I believe
> I've read here that one cannot do that, and I don't actually see a way to do
[...]

Why should you use math in a device driver?

A device driver only drives a device, which means e.g. a hard disk
or a port.

If want to control a robot, for example, then the kernel
driver takes the information of position.
Then you take this informations from a user space program
and maybe do some math opereations on it.
Then you pass the new position back to the driver, which
set the apropriate port-lines.

Don't mix the different levels of software!


Oliver
-- 
In der endlosen Ausrede, "langfristig" werde alles gut, wenn nur kurzfristig
die neoliberalen Rezepte (Lohnsenkungen, Verl�ngerung der Arbeitszeit, Privati-
sierung von Staatsunternehmen, Abbau von Sozialleistungen etc.) befolgt
w�rden, hat der utopische Geist einen Unterschlupf gefunden.    (K.H. Brodbeck)

------------------------------

From: Ralf Render <[EMAIL PROTECTED]>
Subject: Re: memory allocation .
Date: Sat, 26 Feb 2000 12:04:04 +0100
Reply-To: [EMAIL PROTECTED]

I'm sorry. Fabrice is right.

Ralf.

Fabrice Peix schrieb:

> Ralf Render wrote:
> >
> > Try  get_free_pages(GFP_KERNEL, 3).
> >
> > nilesh patel <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
> > [EMAIL PROTECTED]
> > >     hi ,
> > >          how do you allocate a 64 K contiguous real memory for PCI
> > > devices ?
> > >
> > > do reply fast ,
> > >
> > > thanks ,
> > > nilesh .
> > >
> i think it is get_free_pages(GFP_KERNEL, 4). for PAGE_SIZE = 4096 and
> get_free_pages(GFP_KERNEL, 3) for PAGE_SIZE = 8192.




------------------------------

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.advocacy,gnu.misc.discuss
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: Sat, 26 Feb 2000 10:28:12 +0100

[EMAIL PROTECTED] (Christopher Browne) writes:

>>The absence of the ABI destroys the choice. If you are not running
>>RedHat or SUSE Linux, you really are in trouble, today. However, the
>>degree of trouble varies from distribution to distribution.

>No, the absence of ABI discourages the widespread deployment of
>applications in binary form, and encourages the notion of recompiling
>applications from source for particular targets.

I never disagreed on this!

>From an FSF standpoint, that is actually a *GOOD* thing, as it
>represents both:
>   - Discouragement of the use of proprietary, no source,
>     applications, and
>   - Encouragement to recompile applications *from* source, thus
>     encouraging proliferation of understanding of the sources.

Binary distribution is a fact, that we have to arrange with. You can
fight it, if you want, but you will do Linux no good with your
efforts. I thing noone really expects to get oracle, Adabas-D or even
SAP/R3 in source code, just because these companies do want to offer
their products for Linux users, too.

The source is not always available, and Linux must offer a sollution
for these cases, or it will not offer the expected Advantages over
Windows.

>Thus, it is far more accurate to say:
>  "If you are *using binary RPMs,* and are not running Red Hat Linux or
>   SuSE Linux, you're in trouble today."

So which other binary format should I prefer? I got a binary
distribution of acroread4, which was not in rp, but a tar file, ang
was in trouble, too!

>>If we want to keep the choice, we'd better create a well defined ABI
>>yesterday!

>The Linux kernel shows off the dilemna fairly nicely: If you create a
>well-defined ABI, this:

>a) Encourages the production of proprietary device drivers

proprietary already exists and this is not the point to change
today. :-(

>b) Encourages people to depend on the ABI, which prevents people from
>   making improvements to the kernel that might break the "permanent
>   ABI."

This is not a matter of the ABI, but of its stability. Since the
Interface between kernel and user code is fairly stable, you always
can have multple sets of the ABI in user code. This kind of
compatibility is not possible in the kernel.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: Sat, 26 Feb 2000 10:03:24 +0100

Craig Kelley <[EMAIL PROTECTED]> writes:

>As does Linux.  You'll see packages built for glibc5, glibc2 and
>(unfortunately) glibc2.1.

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.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Date: Sat, 26 Feb 2000 10:12:01 +0100

[EMAIL PROTECTED] (JEDIDIAH) writes:

>On Fri, 25 Feb 2000 18:34:33 +0100, Mario Klebsch <[EMAIL PROTECTED]> wrote:
>>Albert Ulmer <[EMAIL PROTECTED]> writes:
>>
>>>Nonsense, they all cater the diverse needs of various users. In my view
>>>that's the main point about the whole open source movement: CHOICE! It
>>>is good to be different!
>>
>>The absence of the ABI destroys the choice. If you are not running
>>RedHat or SUSE Linux, you really are in trouble, today. However, the
>>degree of trouble varies from distribution to distribution.

>       No, you just need a package made for your particular iteration
>       assuming that you are unwilling to build your own software or
>       your distributor is incapable of doing it for you.

But what do I do, when no package is available for the CHOICE I made?
Bang, no CHOICE!

>>If we want to keep the choice, we'd better create a well defined ABI
>>yesterday!

>       Well, if you avoid C++, that's not really a problem.
>       
>       This issue is more a 'Why not C++' thing than a 'Why not Linux'.

I do not see the argument about C++. The only C++ compiler widely used
on Linux systems is gcc, and it shlould be sufficient to get stable
calling and name mangling conventions.

The remaining unstability of the ABI is the contents of the
library. An ABI defines a required minimum, and it really should be
possible to agree upon this. However, I see that the use of inline
functions and templates does put library implementation details into
user code. :-( I have no answer to this problem.

So, things are going to get really worse, if the first binary only
programs for kde appear, aren't they?

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

------------------------------


** 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
******************************

Reply via email to