Linux-Development-Sys Digest #231, Volume #8     Mon, 23 Oct 00 07:13:09 EDT

Contents:
  Re: Which Gcc version to compile Linux Kernel ? (Timothy Murphy)
  Re: Which Gcc version to compile Linux Kernel ? (Jim Broughton)
  Re: Driver Loading FPGA Device (Jeff Andre)
  Accessing PCI I/O space ("Peter Huang")
  Q: TV without sound ("T. J.")
  Re: mounted dos partition (Josef Moellers)
  Re: Unresolved symbol mystery (Josef Moellers)
  Re: using /linuxrc (Josef Moellers)
  Re: about Read and Write (Josef Moellers)
  Re: Which Gcc version to compile Linux Kernel ? ("O.Petzold")
  Re: missed munmap delays release() (Wolfram Gloger)
  Re: device release not called on close() (Mathias Waack)
  Re: sockets per process (John Chen)
  Re: sockets per process (John Chen)
  Microsoft Linux API? ([EMAIL PROTECTED])

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

From: [EMAIL PROTECTED] (Timothy Murphy)
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Which Gcc version to compile Linux Kernel ?
Date: 23 Oct 2000 01:12:58 +0100

[EMAIL PROTECTED] (Paul Kimoto) writes:

>: This code is intended to build with gcc 2.7.2 and egcs 1.1.2. Patches for
>: building with gcc 2.95 are merged but less tested than other compilers.

I went over to kgcc for compiling kernel-2.4.0-test9 under RedHat-7.0 
(following advice in this newsgroup).

This got rid of the compilation errors,
but threw up a lot of assembly warnings about not being able
to modify .modinfo ,
which seemed to result in no modules being installed
by "make modules_install".

Any advice or suggestions gratefully received.

Incidentally the kernel that came with RedHat-7.0
did not run on my all-SCSI machine.
(Fortunately I had 2.4.0-test2 installed as well.)


-- 
Timothy Murphy  
e-mail: [EMAIL PROTECTED]
tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

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

From: Jim Broughton <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Which Gcc version to compile Linux Kernel ?
Date: Mon, 23 Oct 2000 00:44:00 GMT

Paul Kimoto wrote:
> 
> In article <8ss8js$m1p$[EMAIL PROTECTED]>, T.R. Donahue wrote:
> > There is conflicting information available to which gcc version
> > should preferably be used to compile the linux kernel v2.2.16. There seem to
> > be people who claim that the kernel should preferably be compiled with Gcc
> > 2.72.x instead of Gcc 2.95.x, due to some issues with 2.95.x, and the fact
> > that Linus himself still exclusively uses (and therefore tests) the kernel
> > with 2.72.x.
> 
> (At some point I think that it turned out that Linus and Alan Cox both used
> egcs-1.1.*.)
> 
> Alan Cox now maintains 2.2.*, and in some recent release notes (see
> http://www.linux.org.uk/) he writes:
> 
> : This code is intended to build with gcc 2.7.2 and egcs 1.1.2. Patches for
> : building with gcc 2.95 are merged but less tested than other compilers.
> : Caution is recommended when using gcc 2.95 and feedback is sought.
> 
> --
> Paul Kimoto
> This message was originally posted on Usenet in plain text.  Any images,
> hyperlinks, or the like shown here have been added without my consent,
> and may be a violation of international copyright law.

  I have used the 2.91.66 gcc (also used in egcs 1.1.2) For a LONG time
now. Maybe around 50 kernel compiles and not a failed attempt in the
lot because of an internal compiler error.

-- 
Jim Broughton
(The Amiga OS! Now there was an OS)
If Sense were common everyone would have it!
Following Air and Water the third most abundant
thing on the planet is Human Stupidity.

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

From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: Driver Loading FPGA Device
Date: 23 Oct 2000 02:11:35 GMT

Rick Ellis ([EMAIL PROTECTED]) wrote:
: In article <8s2k2f$cou$[EMAIL PROTECTED]>,
: Jeff Andre <[EMAIL PROTECTED]> wrote:

: >: Just call schedule() inside the loop.

: >I looked into that.  schedule() does release the kernel lock.

: Are you loading the FPGA in module_init?  If so, just queue a task
: (similar to a bottom half) at that time and do the loading in it.
: That way you won't be holding a kernel lock during the loading.

No, the FPGA code is loaded by two ioctl() calls (there's two parts
to load).  That way the application can load bug fixes without
changing the driver.  Probably change that before production to use
a second module that contains the parts that get downloaded.

I did get some time and convinced myself that calling schedule() will
properly restore the lock.  However, I like your solution.  The
ioctl() call could queue a task and the load status could just checked
be at a later time.

--
Jeff Andre

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

From: "Peter Huang" <[EMAIL PROTECTED]>
Subject: Accessing PCI I/O space
Date: Sun, 22 Oct 2000 21:38:56 -0700

Hi

with pci memory space. I can call pci_find_device and then ioremap to access
a pci memory space.
How do I access PCI I/O space?

Peter



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

From: "T. J." <[EMAIL PROTECTED]>
Crossposted-To: alt.comp.linux,alt.os.linux,de.comp.os.unix.linux.misc,de.comp.tv+video
Subject: Q: TV without sound
Date: Mon, 23 Oct 2000 07:59:43 +0200

Hi,

since upgrading from kernel 2.2.xx to 2.4.0-test9=20
I don't get sound working while looking TV. It worked
fine before. Do anyone have an idea?

It doesn't work neither if I link all modules statically=20
into the kernel nor if loaded dynamically by modutils.

My system: Hauppauge WinTV/Radio /w BTTV878, Philips
PAL, Philips Tuner, MSP3400; Athlon 800; SB Live! Value;
Geforce 2 GTS; 512 MB; Kernel 2.4.0-Test9; OSS 3.9.3r
or emu10k1 module.

TJ


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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: mounted dos partition
Date: Mon, 23 Oct 2000 08:14:14 +0200

The Ghost In The Machine wrote:
> =

> In comp.os.linux.development.system, Raymond Mroz
> <[EMAIL PROTECTED]>
>  wrote
> on Fri, 20 Oct 2000 11:59:45 -0300
> <i6ZH5.74238$[EMAIL PROTECTED]>:
> >Hello,
> >
> >We are running a Linux OS in a product and are required to access a FA=
T32
> >filesystem.  This is set up to mount in the fstab file.  My question i=
s
> >this:  If the product is repeatedly and ungracefully shutdown, can the=
 FAT32
> >filesystem which is being mounted (and ungracefully unmounted) become
> >corrupted over time.  Are there any other problems which may arise?
> =

> What product are you referring to?
> =

> - Linux?
> - Microsoft Windows?
> - An application running under Linux?
> - An application running under Microsoft Windows?

???
"We are running _a_Linux_OS_ ..."

> Proper shutdown of Linux involves the "shutdown" command.
> Note that /etc/inittab in RedHat -- and probably in other
> releases -- contains an entry similar to

"ungracefully shutdown", this sounds more like "pulling-the-plug
shutdown" rather than:
> ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Raymond, as long as you don't modify any data on the FAT32 disk, not
much harm should be done to the mounted filesystem. As soon as you write
to the file system, the buffer cache will store the data in memory prior
to writing it to disk. This data is irrevocably lost when you pull the
plug or hit the reset button. Note that you can't get away with
increasing the rate of calling sync, because Murphy will see to it that
your system is "ungracefully shutdown" just before the next call.

Perhaps modifying the close() systemcall to flush the data to disk when
a file is closed will help, but it will fail if the system goes down
before a file is closed.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Unresolved symbol mystery
Date: Mon, 23 Oct 2000 08:19:32 +0200

stephane masson wrote:
> =

> From my expierience, theses number seems to be a kind of checksum
> (MODVERSION option) that check if the module and the version of the ker=
nel
> are the same.

Close, but not quite.

These numbers are (sort of) a checksum over the prototype of the
function, the kernel version is hidden somewhere else in the module.
A different numbers means that the prototype of the function has
changed. Unfortunately I don't have any 2.0.xx source code readily
availab,e but you should be able to check this.

> The solution is to recompile the kernel. Boot from the new kernel and
> recompile the module from this kernel.

The prototype (i.e. the calling sequence) of the function won't change
-> the number won't change.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: using /linuxrc
Date: Mon, 23 Oct 2000 08:23:01 +0200

[EMAIL PROTECTED] wrote:
> =

> I'm about to make use of the /linuxrc feature.  I'm interested in any
> experiences people who have tried this for various purposes may have.
> I don't need any help (yet) on making this happen; I'm just wanting
> to be wary of any quirks I may encounter.

AFAIK, despite the fact that the first line looks like a shebang calling
/bin/bash, linuxrc is NOT a shell script and you won't be able to use
(full) shell functionality there. You can put a few insmods in there,
but that's about it.

I'd be very happy if my view is incorrect, because I too need to call
some external programs and do some flow control in there.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: about Read and Write
Date: Mon, 23 Oct 2000 08:26:57 +0200

Richard wrote:
> =

> When I use the system call read and write for block device, it will be
> requested through the buffer_head to get the data. Are there any ways t=
o
> bypass the buffer_head so that I can retrieve the data directly from th=
e
> disk?

You're asking for "raw I/O" which, afaik, will be in 2.4

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

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

From: "O.Petzold" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Which Gcc version to compile Linux Kernel ?
Date: Mon, 23 Oct 2000 07:43:14 +0200

>
> This got rid of the compilation errors,
> but threw up a lot of assembly warnings about not being able
> to modify .modinfo ,
> which seemed to result in no modules being installed
> by "make modules_install".

This is not related on the kernel at all. I've compiled a kernel module which
isn't in the kernel tree with gcc version 2.95.2 19991024 (release)  and
got the similar warnings:

/tmp/ccWv6Hv5.s: Assembler messages:
/tmp/ccWv6Hv5.s:47: Warning: Ignoring changed section attributes for .modinfo

No idea what this means ...
Olaf



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

From: Wolfram Gloger <[EMAIL PROTECTED]>
Subject: Re: missed munmap delays release()
Date: 23 Oct 2000 10:00:56 +0200

[EMAIL PROTECTED] writes:

> My simple applcation has a loop which
> opens and closes a device several (could be many)
> times in succesion. While the device is open,
> I use mmap() to map a PCI space. Note that I forgot
> to put munmap() before the close.
> 
> It turns out that close() returns with a normal exit
> code. However, the release() function of the driver
> is no called until the application exits. Then, when
> the program exits, release() is called for every
> close() call made in the loop.
> 
> Admittedly it was a mistake to leave out the
> munmap() call. But why would the release() calls to the
> driver be stacked up like that? The close() documentation
> leads you to believe that the memory segments would
> be returned on close(), since it is said that close()
> causes "all resources" associated with the file
> descriptor to be returned.

man 2 close actually says:

       If fd is the last copy of a particular file descriptor the
       resources associated with it are freed;

Note `the last copy'.  What happens in mmap() is that an extra
reference to the file descriptor is created that persists until
munmap().  The Linux man page doesn't make that very explicit, but SUS
does (http://www.UNIX-systems.org/onlinepubs/007908799/xsh/mmap.html):

     The mmap() function adds an extra reference to the file
     associated with the file descriptor fildes which is not removed
     by a subsequent close() on that file descriptor. This reference
     is removed when there are no more mappings to the file.

Regards,
Wolfram.

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

From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: device release not called on close()
Date: 23 Oct 2000 10:29:39 +0200

[EMAIL PROTECTED] writes:
> What would cause Linux to delay calling the release() entry point in a
> driver?

This will happen if there are other "instances" of the same 
file descriptor. 

> I have a program which succesively opens() and closes() a
> device. However, the release() in the driver is not called during the
> close().
> 
> Instead, it looks like the close() calls are stacked up. When the
> program terminates, the release() function is called however many
> times close() was called during the program execution.
> 
> The open() call always results in an immediate call to the device
> open() function in the driver.
> 
> I am detecting this behavior by putting printk() calls in the driver.
> 
> I am not doing multiple opens on the deviceefore closing.  The
> returned file descriptor is beging recycled.

Recycled? You mean duplicated using dup()? So the kernel will count 
the references and the release method will be called after calling 
close() for the last descriptor. 

This is not a Linux feature, see Stevens for details.

Mathias

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

From: John Chen <[EMAIL PROTECTED]>
Subject: Re: sockets per process
Date: Mon, 23 Oct 2000 02:06:28 -0700
Reply-To: [EMAIL PROTECTED]

Hello,

I have a question about tcp socket connections in qeneral.

I was just wondering what is the default queue size relating to incoming
tcp connection requests that linux can handle right out of the box.� Is
there any way to change it and increase this queue size and how?

thanks..

-john

The Ghost In The Machine wrote:

> In comp.os.linux.development.system, Eclipse mail
> <[EMAIL PROTECTED]>
> �wrote
> on Thu, 12 Oct 2000 22:41:07 -0400
> <[EMAIL PROTECTED]>:
> >i have realized that we can have only 255 file descriptors open per
> >process ( including sockets).
> >is it possible to have more than 255 file descriptors per process so
> >that we can have a lot more tcp/ip connections per process ?
> >
>
> The limit is controlled by a #define constant (NR_OPEN) which
> sits in /usr/include/linux/limits.h.� One can define this to be
> anything up to 1048576.� Be advised that this may cause problems
> with fd_set, which assumes the maximum fd possible to be 1023.
> Go over that, and one might corrupt memory unless one also
> modifies /usr/include/linux/posix_types.h.� Note that file
> descriptors are allocated first-fit starting at 0, so memory
> corruption isn't much of an issue for existing programs that
> know how to limit their open files.� But if they don't, well... :-/
>
> A better solution would probably be to fork children off;
> each child can then do what it wants regarding file sockets.
> httpd employs this, for example.
>
> If you really needed 10240 file sockets open, and you had no other
> descriptors open in your children (unlikely), you could spawn
> off 10 children, each with 1024 sockets.
>
> This solution is also more portable, as other Unices are usually
> limited to 1024 open descriptors.
>
> --
> [EMAIL PROTECTED] -- insert random misquote here


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

From: John Chen <[EMAIL PROTECTED]>
Subject: Re: sockets per process
Date: Mon, 23 Oct 2000 02:11:29 -0700
Reply-To: [EMAIL PROTECTED]

Hello,

I have a question about tcp socket connections in qeneral.

I was just wondering what is the default queue size relating to incoming
tcp connection requests that linux can handle right out of the box.� Is
there any way to change it and increase this queue size and how?

thanks..

-john

The Ghost In The Machine wrote:

> In comp.os.linux.development.system, Eclipse mail
> <[EMAIL PROTECTED]>
> �wrote
> on Thu, 12 Oct 2000 22:41:07 -0400
> <[EMAIL PROTECTED]>:
> >i have realized that we can have only 255 file descriptors open per
> >process ( including sockets).
> >is it possible to have more than 255 file descriptors per process so
> >that we can have a lot more tcp/ip connections per process ?
> >
>
> The limit is controlled by a #define constant (NR_OPEN) which
> sits in /usr/include/linux/limits.h.� One can define this to be
> anything up to 1048576.� Be advised that this may cause problems
> with fd_set, which assumes the maximum fd possible to be 1023.
> Go over that, and one might corrupt memory unless one also
> modifies /usr/include/linux/posix_types.h.� Note that file
> descriptors are allocated first-fit starting at 0, so memory
> corruption isn't much of an issue for existing programs that
> know how to limit their open files.� But if they don't, well... :-/
>
> A better solution would probably be to fork children off;
> each child can then do what it wants regarding file sockets.
> httpd employs this, for example.
>
> If you really needed 10240 file sockets open, and you had no other
> descriptors open in your children (unlikely), you could spawn
> off 10 children, each with 1024 sockets.
>
> This solution is also more portable, as other Unices are usually
> limited to 1024 open descriptors.
>
> --
> [EMAIL PROTECTED] -- insert random misquote here


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

From: [EMAIL PROTECTED]
Subject: Microsoft Linux API?
Date: Mon, 23 Oct 2000 10:00:30 GMT

We all know what happened when Microsoft invested in Apple.
They ended up using MS Internet Explorer.  In return
Microsoft created the next version of their MS Office for Mac.

This is kind of weird.  Apple dependent on another company
to create a product that runs on their OS, in order for their
OS/Mac to thrive and sell more.

You never hear Microsoft asking Sun to port Solaris applications
to Windows in order for Windows to thrive.

This means that there are not many developers at Apple who knows
how to make good applications.  Applications that are strong enough
people will buy an operating system to run it.

Lets look at Linux.  There are basically no hardcore applications
that Linux has that people NEED to use Linux to run it.  But there is
MS Office (used by like 90% of the companies in the world).  Microsoft
recently bought influence in Corel (which has their own Linux flavor).
If
Corel were to port .NET apps from Microsoft (ActiveX and COM+ stuff)
to Linux, and it becomes popular, the Linux community may become
dependent on Microsoft apps.  (Similar to Mac dependent on MS Office
to thrive).  Pretty soon, Microsoft can use this dependency to
leverage control over the Linux marketplace.  (The same with
what they did on the Apple marketplace).  They may end up tweaking
the code so that performance on Linux is not on par with performance
on Windows, which may shift the people previously commited to
Linux to go to Windows (if they only need Windows
Apps, the operating system does not matter anymore).

The other option is for Microsoft to market their own Linux.
But we all know that any extension of Microsoft is meant to
create dependency on Microsoft Windows.  For example, when
Microsoft created J++, they put a lot of plumbing that made
it work only on Windows.  When they bought Xenix (unix), they
basically dumped it in favor of Windows even though windows was
at its infancy, and DOS was not as sophisticated as unix at that time.
So when Microsoft goes into the Linux space, they will most likely
put plumbing in Corel Linux or create their own Linux so that makes
certain parts of the OS dependent on Microsoft technology.
(Like J++ needs windows API for sophisticated and easy to use
features).  People wanting to connect to windows world through
linux will only buy Linux with the Microsoft plumbing (no other
Linux will have it since only Corel Linux has the .NET stuff).
This would end up extending Microsoft's presence into Linux.
Soon, Microsoft's Linux would become the most popular, and basically
attract all the investements and dollars.  Other Linux distribution
companies won't be able to compete and die out.  (Similar to what
happened to Borland and Corel and Novell).

With a lot of companies hoping onto the Linux bandwagon (IBM and
Sun for example), it looks like this is another area ripe for
investment and marketing activity.  Microsoft will be wanting to
extend their presence to this market as well.

There are basically three ways to attract computer consumers.
1) Attract them via the operating system
2) Attract them via the application
3) Attract them via the hardware

For Microsoft:
1) Windows
2) MS Office
3) Special Keyboard/Mouse

For Linux:
1) Linux
2) ??
3) ??

People are attracted to Linux because of the platform right now.
It is a neat free gadget to play with, and can run neat open
source applications.  This is very similar to the attraction
Microsoft had for its first versions of Windows.  (3.11 for example).
People got attracted to the OS and started developing apps for it.
The Linux community is now beginning to see apps being developed for
it, but there is yet a strong linux app geared specifically for Linux.
General GNU and opensource apps from Mozilla and Apache run on
multiple operating systems, not just Linux.  If apps start
coming to Linux so that it is of very high value and runs
specifially for Linux, THAT is the day when Windows will see
serious competition.  However, if Microsoft was to become the
first to dominate the Linux apps market like they did with Apple,
then Linux may become just another MS dependent OS market.
So in the near future you will see Microsoft try to wrestle control
away from the Linux community, like they tried to do with their
proprietary version of Java (J++).

In the marketplace, you either create a competing product with
different technology, or you make a similar product to steal
the market.  Palm was first, so Microsoft came out with CE/PocketPC
(different technology).  For the browsers, Microsoft made a similar
one to steal the market, and then incorporated differences to
make it stand out.  For Linux Microsoft is going to try to
make a similar product via Corel Linux to steal the market and
then make it different to stand out via .NET and in the future
MS Office that ONLY runs on Linux with .NET stuff underneath.

Market penetration is very important.  If the size of the market
is not big enough, it may get swallowed up.  The video gaming market
is big enough that three major players can fit in it.  It is even
bigger than the computer gaming market.  If market penetration is low,
it may dissapear like a fad.  Newton did not generate enough of a
market to warrant existence.  Palm is just around the corner, and
is getting help from manufacturers like Sony.  Commodore and Atari
went away because the market was not big enough and the big industry
players basically used their executive influence to axe them.

Is it possible to compete with Microsoft?  Definitely.  There are
many ways.  For Linux, you can utilize Linux characteristics and
use them as an advantage.  Because Linux is developed on the
internet, it needs to keep development in internet time.  An evolving
platform cannot die if it has market penetration and is able to
sustain it through fast evolutions in internet time.  Feature for
feature, if the Linux community comes out with apps exponentially
for linux, this would be a driving force that will make it the most
popular OS.  If linux evolves more user=friendly interfaces for the
consumer, it may end up the OS for the rest of us.  But people
need to develop apps for it, apps that run specifically for it.

Linux must play to the human psychie.  A kid who see's a cool game
will buy the platform to play the game at all costs.  A person who
sees a neat minicomputer like a palm computer will get it if he is
"hooked", and will try to buy it at all costs.  Similarly,
if there is ONE game that only runs on Linux and is a game people
will buy a Linux computer just to play it, then that is the day
when Linux will be a common household item.

This is the strategy Microsoft played when it grabbed the UK
game developer of Black and White to produce only for the XBox.
If Black and White is a hot ticket to a new platform, everyone
will get the XBox just to play it.




Sent via Deja.com http://www.deja.com/
Before you buy.

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


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