Linux-Development-Sys Digest #125, Volume #8      Tue, 5 Sep 00 19:13:13 EDT

Contents:
  Re: system without graphic HW ("Christian Hoefer (EED)")
  netif_rx ? ([EMAIL PROTECTED])
  Feedback wanted - PLEASE READ (Bryan J. Nakagawa)
  DMA and CPU cache interactions (Marc SCHAEFER)
  Re: Reading books or learning sample codes: Which is better? (Bruno Ascenso)
  Re: will GUI program compile using gtk+ run on KDE? (Eamon Skelton)
  Re: adding a module (Bruno Ascenso)
  Re: New nVidia drivers on 2.4 kernel (Reinhard Arlt)
  Re: using the /proc interface (Bruno Ascenso)
  Re: trivial module question... (Bruno Ascenso)
  Re: netif_rx ? (Kaz Kylheku)
  Re: Swap Atomically? (Kaz Kylheku)
  CPU usage ("Pieter Thysebaert")
  struct inode_operations question ("Jay Randall")
  Re: struct inode_operations question (Alexander Viro)
  Re: Memory allocation Strangeness.  (Update) (Nix)
  Re: autogen.sh, configure, The Professor and Mary Ann (Nix)
  Re: Caching files from CD---problem when playing MP3s on CD (Nix)
  Re: linking in GPG (Nix)
  Re: Swap Atomically? (Nix)
  Re: Memory allocation Strangeness.  (Update) (Kaz Kylheku)

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

From: "Christian Hoefer (EED)" <[EMAIL PROTECTED]>
Subject: Re: system without graphic HW
Date: Tue, 05 Sep 2000 17:16:17 +0200

Thanks Peter, thanks Tim,

Peter Pointner wrote:
> 
> Tim Roberts <[EMAIL PROTECTED]> wrote:
> > You shouldn't have to modify ANY code.  Unix systems run like this all the
> > time.
> 
> But you can remove the vga and virtual terminal support from the kernel,
> if you don't need it. Support for a serial console might be usefull.
> 
I have serial/ssh communication configured, that's not the problem. But
it will work
not before the getty/sshd is running - no chance to trace any problems
during bootup.
And I suspect the linux kernel will probe for vga/cga/whatever HW to
bypass
the vga bios on a later stage of boot process - and will complain if no
HW
is found.

Not right ? 

> > There is a how-to that describes how to redirect your console to a serial
> > port (probably the SERIAL how-to...).  That'd be a good place to start.
> 
> /usr/src/linux/Documentation/serial-console.txt
> 
> >>And, is there a way to capture boot messages and store them once the
> >>first file system is mounted.
> 
> > Most of the interesting boot messages go into the message log.

not earlier than the logdaemons are up 

> 
> man dmesg klogd syslogd syslog.conf
> 
> Peter
/christian

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

From: [EMAIL PROTECTED]
Subject: netif_rx ?
Date: Tue, 05 Sep 2000 15:11:21 GMT

im lost and i hope that any one can help me ....
i need detail information about how netif_rx works
thus how it call the right function on the upper layer
thanks ayalone


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

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

From: Bryan J. Nakagawa <[EMAIL PROTECTED]>
Subject: Feedback wanted - PLEASE READ
Date: Tue, 05 Sep 2000 15:29:39 GMT

A technology startup company has created a Java-based dynamic application 
infrastructure that provides the following
benefits for enabled applications:

*  UPGRADE applications dynamically, on-the-fly, and in realtime without stopping the 
application
*  FAILBACK to the previous version of an app automatically if the upgrade experiences 
an unforeseen problem
*  TEST with live datastreams from a production environment

Our company would like to solicit participants for feedback.  

YOUR INPUT & FEEDBACK ARE CRITICAL!


The types of participants would be those in an UNIX/Linux environment, using JAVA, 
servlets, EJBs, JSP, JDBC.  

We would appreciate your participation, as we want to make sure we are developing a 
product that addresses your needs
exactly.

If you are interested in participating, please email me ([EMAIL PROTECTED]).  All 
information given will be considered
confidential and nothing will be forwarded.  No one will sell you
anything.  Your confidentiality will be protected.  Thank you for reading this post.





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

From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: DMA and CPU cache interactions
Date: 5 Sep 2000 12:12:30 GMT

In a UP x86-based system with Linux 2.2.x (say 2.2.16), I have
implemented the following:

- a user-level program which opens a special misc device, and then
  mmap()s some memory from it

- the special misc device which allocates a physically contiguous
  amount of memory (kmalloc(size, GFP_KERNEL)) suitable for PCI
  DMA, mem_map_reserve() it, ensuring page boundaries are correct,
  and then mapping it to user space with the mmap() method.

Now, the user-level program will call ioctl()s into the driver, which
we will assume block while the block of data are used by DMA (either
reading or writing). As soon as the PCI DMA finishes, the ioctl()
will be returning, and the user-space will start to use the data
through the mmap().

For the sake of the discussion, assume the PCI DMA goes to a SCSI
host adapter: it just takes the DMA direction, physical (bus) address
and size in bytes.

So far I haven't seen any problem with that. However there might
be an issue with the CPU cache.

My question: is there anything to do with the CPU caches ?  Such as,
user-space writes some data, calls the submit DMA ioctl(),
which calls some flush_cache() function, does the DMA, and returns ?
Similarly for the read cache.

Thank you for information on that subject, such as pointers, remarks, etc.


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

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: Reading books or learning sample codes: Which is better?
Date: Tue, 05 Sep 2000 18:34:14 +0100

Hans wrote:

> Hello,
>
> I'm a newbie Linux programmer. I used to develop M$ Windows applications,
> especially GUI part. There are many books about programming in Linux. But, to
> buy all the books beyond budget. So, I'm considering online resources for
> learning Linux programming.
>
> In addition, if you know a site which has collection of sample codes inform
> me. To analize Kernel source or good program is next step of beginner. :-)
>
> Thanks,
>
> --
> My homepage is 'http://www.geocities.com/flyingdoggle/main.html'
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

If you are going to program in C (and I hope you do) and already know the
language you probably don't need any book.

The source code of other Linux programs can be very helpful, but that depends on
your specific problem. Some code can be a little tough to understand...

Check http://www.linuxdoc.org and if you don't find what you want post a message
to this NG and probably someone can help you with specific documentation.

If you are into developing graphical applications I believe that the above site
also contains some documentation (but I never did this myself and don't know if
it's easy to find docs).

-- BA

PS: The programming "bibles" are:
Kerningan & Ritchie for C language.
Unix Network Programming by R. Stevens for network programming and a lot more.
Linux Device Drivers by Alessandro Rubini for DD programming.

Every good Linux hacker knows at least these three by heart, but once more the
need for them depends on what you are doing.


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

From: [EMAIL PROTECTED] (Eamon Skelton)
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Re: will GUI program compile using gtk+ run on KDE?
Date: Tue, 05 Sep 2000 17:45:35 GMT

>can I use gtk+ to program GUI application and run it in KDE other then GNOME
>which I suppose it is suppose to run on.
>
>

Yes, GTK programs will run in KDE. To run them, you must have 
GTK+ installed. To compile GTK programs you must have GTK+-devel 
installed.  

E.S.


--
Remove 'X' to reply.

EI9GQ homebrew radio page
http://www.qsl.net/ei9gq



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

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: adding a module
Date: Tue, 05 Sep 2000 18:44:57 +0100

Susukita Ryutaro wrote:

> >> If you use kerneld (a daemon that handles module requests buy the
> >> kernel) you just add the line:
> >> alias name mydriver
> >> where name is the module's id in register_chrdev() or whatever call you
> >> use.
> >>
> >> Never use char-major-xxx because of what you said: the major changes!
> >>
> >> --Bruno
>
> I am sorry my follow is late.
> The kerneld is not running on my 2.2.x system.  In the manpage of
> kerneld, 'kerneld is obsolete as of kernel 2.1.90'.
>
> The module's id in register_chrdev() is 'mydriver'.
>
> Computational Science Division
> The Institute of Physics and Chemistry(RIKEN)
> SUSUKITA Ryutaro

I'm sorry about the mistake, where I said kerneld, I mean kmod ;-)
About your problem, (if I still remember it) I'll give you a copy of an
e-mail I recently sent hopping it will help you:

First, you put your module under /lib/modules/'uname -r'
Then, you have two options:
First you can statically assign a major to your driver; if you read
Documentation/devices.txt you see that currently (2.4.0-testX) majors 195-239
are
unassigned, but of course, this may change in a later release.
In this case you just add this line
alias char-major-xxx yourmodule
to /etc/modules.conf
Easy & clean...

The second option (and the one I recommend) is to let the kernel
dinamically assign a major number to your driver.
In order to do this you need to write a small script to read /proc/devices
and create the nodes. Usually this script is placed under
/etc/rc.d, but it depends on your distribution. I've just used
suse and slakware, so you have to find out where to put it in your own dist.

This script will tipically install the module, read its major from
/proc/devices, and create the nodes (don't forget to remove the old ones).

If you have any problem writing the script just ask. (Though I may take
some time to answer back... ;-)

For more information I suggest you read (if you have access to it):
"Alessandro Rubini, Linux device drivers"

--Bruno


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

From: Reinhard Arlt <[EMAIL PROTECTED]>
Subject: Re: New nVidia drivers on 2.4 kernel
Date: Tue, 05 Sep 2000 20:01:24 +0200

Hello

See other drivers.
You only need to replace MAP_NR() by vrit_to_page().
The type of the variable map_nr then will be "struct page *", and no
longer "long".

Reinhard

herman dumont wrote:
> 
> [EMAIL PROTECTED] wrote:
> >
> >   Anybody managed to get these working yet? Looks
> > like some of the paging calls need to be changed.
> >
> >   Just thought I would see if anyone else has done
> > it before I give it a shot.
> Hi,
> i got a patch from:
> [EMAIL PROTECTED]
> 
> HTH
> 
> --
> web.wanadoo.be/herman.dumont
> Linux herman 2.4.0-test7 #2 Fri Sep 1
> gcc version egcs-2.91.66
> libc.so.6

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

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: using the /proc interface
Date: Tue, 05 Sep 2000 19:02:52 +0100

[EMAIL PROTECTED] wrote:

> I'm looking for help on how to implement a two way interface for
> configuring/querying a kernel module threw the /proc filesystem. where can I
> find the relevant documentation. thanks Eran <[EMAIL PROTECTED]>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Documentation? Probably the usual place (www.linuxdoc.org).
How I do it?
It's as easy as this:

======
struct proc_dir_entry my_entry;

my_entry = create_proc_entry ("myentry", S_IFREG | S_IRUGO, &proc_root);
my_entry->proc_fops = my_entry_fops;
======

where my_entry_fops is the usual structure file_operations where you define
your read and write functions.

Then I check in the linux source for the file drivers/pci/proc.c which is the
pci proc interface implementation.  It's easy to understand and if you do just
like in there, it will work.

Don't forget in the end
remove_proc_entry ("myentry", &proc_root);

If you need any more help just ask...

-- Bruno Ascenso


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

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: trivial module question...
Date: Tue, 05 Sep 2000 19:16:14 +0100

Joris Vankerschaver wrote:

> Hello,
>
> I understand (allmost) everything from the "linux module programming guide",
> but I can't compile all but the most simple modules.  Here's a sample of what
> doesn't work:
>
> #include <linux/kernel.h>
> #include <linux/module.h>
>
> #if CONFIG_MODVERSIONS==1
> #define MODVERSIONS
> #include <linux/modversions.h>
> #endif
>
> #include <linux/proc_fs.h>              /* Causes the problem */
>
> int init_module() { return 0; }
> void cleanup_module() {}
>
> I compile with the following flags (gcc 2.7.2.3, as suggested): -0
> -D__KERNEL -DMODULE -DLINUX
>
> The linux/proc_fs.h messes everything up: i get tons of errors (really!) on
> ridiculous errors like "parse error before clock_t in
> /usr/include/linux/time.h".  When I go and look at those supposed errors,
> I can't find any...  (btw the problem occurs with other headers too....)
>
> I'm using kernel 2.4.0test4 (When using 2.2.16 I just got some warnings with
> -Wall turned on, but the compiling worked.  I only couldn't insert the
> module.)
>
> Is this a) a kernel problem (not very likely), b) a gcc problem (not very
> likely), c) my own fault (very likely)?
>
> Any help - or guidance would be appreciated a lot!
> thanks.
>
> Joris Vankerschaver

You don't need <linux/proc_fs.h> to compile that.

Try this:

/***************/
#define __KERNEL__
#define MODULE

#include <linux/kernel.h>
#include <linux/module.h>

int init_module() {
    printk(KERN_DEBUG "Hello world\n");
    return 0;
}

void cleanup_module() {}

/***************/

Compile with 'gcc -Wall -c modname.c'

Everything should work without even a warning... and 'dmesg' will show you the
message.

--Bruno Ascenso



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: netif_rx ?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 05 Sep 2000 18:36:20 GMT

On Tue, 05 Sep 2000 15:11:21 GMT, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>im lost and i hope that any one can help me ....
>i need detail information about how netif_rx works
>thus how it call the right function on the upper layer
>thanks ayalone

The netif_rx function does very little work. Basically, it deposits your packet
into a global queue and then arranges for some protocol input processing to
take place.  I believe that it does not call all the way up into any upper
protocol layers. Consider that netif_rx is often called by interrupt service
routines; as such it must do its work quickly so that it can return as soon as
possible.

As a driver developer, you don't need to understand the detailed workings of
netif_rx to use it; what is most important is to call that interface correctly.

If you are really interested in how it works, why don't you read the source
code?

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Swap Atomically?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 05 Sep 2000 18:40:03 GMT

On 04 Sep 2000 20:50:57 +0300, Kalle Olavi Niemitalo <[EMAIL PROTECTED]> wrote:
>i486 has a "cmpxchg" instruction which does something like that:
>it compares a value in memory to a value in a register, and if
>they match, it stores another value in that memory location.  You
>could perhaps define compare_and_swap as an inline function which
>runs that instruction.  What parameters does the AIX function
>take?

Incidentally, there is a funciton called compare_and_swap function inside
LinuxThreads, but it has never been exposed as a library interface. I doubt
Ulrich Drepper would go for it.

This compare_and_swap takes four parameters: in addition to the pointer to the
location being swapped, and the old and new value, it takes a pointer to a
spinlock variable. This allows for emulation on platforms that don't have the
right instruction.

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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

From: "Pieter Thysebaert" <[EMAIL PROTECTED]>
Subject: CPU usage
Date: Tue, 5 Sep 2000 21:36:34 +0200

Hi all...

I have some questions concerning the "CPU-usage" of processes as indicated
(in %) by e.g top ...
First of all, what does that really mean and how is it calculated ?
Second : is it possible to write a program that will "use" the CPU for a
specified percentage...
Say a program that, when given a parameter (like 10%) really shows up as
using 10% cpu load in top ?
(it just needs to do anything th at will make it use the CPU (nothing
useful))

What would be a descent approach to write such a (small) program ?

Pieter




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

From: "Jay Randall" <[EMAIL PROTECTED]>
Subject: struct inode_operations question
Date: Tue, 5 Sep 2000 14:09:56 -0700

Hello,

Can anybody tell me why in the ext2_file_inode_operations there are no
entries for create, lookup, link, unlink, etc.  I see that they are there in
ext2_dir_inode_operations, but as many of the operations are performed on
files as well, or in some cases exclusively, I would expect to see entries
in ext2_file_inode_operations.
How does VFS route an operation like create for a file?

Thanks for any help,
Jay.




====== Posted via Newsfeeds.Com, Uncensored Usenet News ======
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
=======  Over 80,000 Newsgroups = 16 Different Servers! ======

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: struct inode_operations question
Date: 5 Sep 2000 18:00:22 -0400

In article <[EMAIL PROTECTED]>,
Jay Randall <[EMAIL PROTECTED]> wrote:
>Hello,
>
>Can anybody tell me why in the ext2_file_inode_operations there are no
>entries for create, lookup, link, unlink, etc.  I see that they are there in
>ext2_dir_inode_operations, but as many of the operations are performed on
>files as well, or in some cases exclusively, I would expect to see entries
>in ext2_file_inode_operations.

Huh? You can create a subdirectory in file? Or remove it for that matter...
Or create a regular file in...? create() is _not_ an operation on file,
for one thing because file doesn't exist when it's called. All of them are
acting on parent and they belong to parent.

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Memory allocation Strangeness.  (Update)
Date: 05 Sep 2000 20:09:37 +0100

"Tristan Wibberley" <[EMAIL PROTECTED]> writes:

[memory overcommitment]
>                                         This is a very serious bug in Linux,
> which prays to god that you don't ever use the memory that you allocate for
> your use

Oh, please, let's not start this again. It was thrashed to death on l-k
last year :(

This is a feature, not a bug. You can partially turn it off (echo 0 >
/proc/sys/vm/overcommit_memory); when you do that, memory allocated by
your process always has backing store somewhere at the time it is
allocated. But this is not much of a win: turning it off completely
would consume huge hoards of memory, because the semantics of normal
memory overcommitment with respect to whether you really have the memory
you asked for are identical to those of COW page copying on fork(). And
you really, *really* don't want to turn that off, unless you have dozens
of gigabytes or more of swap just lying around to be wasted.

>          (sounds a bit silly when you think about it, doesn't it - badly
> written software doesn't fsck up your system by reserving all memory, but
> well written software does by using memory you haven't got and killing
> everything in it's path :( The assumption is that badly written software is
> more likely, and only the few people with lots of money invested in their
> software and their business to make it good/successful will get bitten -
> very sad I think).

Wrong, see above. It's essential, given the fork()/exec() model, to work
this way. Unless, that is, you like the mess of vfork() or the
restrictions of many other OSes spawn() better?

What Linux really needs (and Unix in general, because all Unices new
enough to use COW fork() have this problem) is a signal that is sent
when you are low on memory, like AIX's SIGDANGER (I think it is).

It does not need no-overcommit-and-no-COW-fork(). And without that you
won't get the perfect determinism you seem to want. (And with it, many
data structures, like that used by C++'s vector<>, will eat even more
silly amounts of memory. A vector<> is a sparse-ended array; it doubles
in size whenever any growth is necessary; this is needed to satisfy its
time complexity constraints. Hence you are likely wasting 50% again of
the size of your vector<> whenever you use one.)

> obstacks can provide much more efficient memory use (see GNU libc
> documentation).

But note that obstacks can be fantastically annoying. They're so
annoying that we just completed a (fairly) painful migration away from
obstacks in GCC (beforehand, by far the largest single user of obstacks)
and towards garbage collection. This has problems of its own, but at
least we can understand the code again and don't get bitten by silly
allocation-ordering bugs now.

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: autogen.sh, configure, The Professor and Mary Ann
Date: 05 Sep 2000 20:15:15 +0100

[EMAIL PROTECTED] writes:

> If you're "adding" it for yourself, what I usually do is pass it to
> configure, ala (in sh-flavored shells):
> 
> CFLAGS="-Dmyoption" ./configure
> 
> That propogates it through all the automagic files, as well as during
> the configure tests themselves. It also makes it easier to build
> binary packages, if you do that sort of thing.

You should always use

./configure CFLAGS="-Dmyoption"

as otherwise, CFLAGS won't be set by config.status, so config.status
--recheck (as run by automake-generated makefiles when
--enable-maintainer-mode is on) will not pick it up.

If you want to add the same things for many packages in a programmatic
fashion, you should use a site-config file; see the autoconf manual for
information.

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Caching files from CD---problem when playing MP3s on CD
Date: 05 Sep 2000 22:05:34 +0100

Bruce Stephens <[EMAIL PROTECTED]> writes:

> The same sort of idea strikes me as possible for what I want: I just
> need a user-mode filesystem (and I'm sure I've seen such things
> around, although I don't recall the name), and it could layer on the
> CDROM---each time a file is opened, it could copy it to somewhere on
> the hard disk and operate on that.  Similarly, these temporary copies
> could be deleted.

This sounds pretty much exactly like union-mounting, only COW.

Does Linux-2.4's union mounting support COW like that? (I don't have the
2.4 kernel here atm because of a crisis involving `rm -r' and fingers
typing faster than brain, so I can't easily tell.)

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: Nix <$}xinix{[email protected]>
Subject: Re: linking in GPG
Date: 05 Sep 2000 22:36:35 +0100

[EMAIL PROTECTED] (Frank Sweetser) writes:

> Directly linking in gpg probably isn't the best way to go - in the kernel
> you're missing quite a few things, like libc and simple file io, memory
> management is completely different, etc etc.  You're probably better off
> reimplementing the bits you actually need rather than trying to relink the
> object files or even just trying to cut and paste.

... or chattering to a modified userspace gpg over a named pipe. Lock it
in memory if necessary --- it probably won't be --- and have a hack in
the kernel to not try to check gpg's signature ;}

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Swap Atomically?
Date: 05 Sep 2000 22:10:40 +0100

[EMAIL PROTECTED] (Alexander Viro) writes:

> mutexes (muteces? probably not

Not. It is `mutexes'.

(Not, as I saw used once, `mutii'. Gaaaah.)

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Memory allocation Strangeness.  (Update)
Reply-To: [EMAIL PROTECTED]
Date: Tue, 05 Sep 2000 23:03:31 GMT

On 05 Sep 2000 20:09:37 +0100, Nix <$}xinix{[email protected]> wrote:
>"Tristan Wibberley" <[EMAIL PROTECTED]> writes:
>
>[memory overcommitment]
>>                                         This is a very serious bug in Linux,
>> which prays to god that you don't ever use the memory that you allocate for
>> your use
>
>Oh, please, let's not start this again. It was thrashed to death on l-k
>last year :(
>
>This is a feature, not a bug. You can partially turn it off (echo 0 >
>/proc/sys/vm/overcommit_memory); when you do that, memory allocated by
>your process always has backing store somewhere at the time it is
>allocated. But this is not much of a win: turning it off completely
>would consume huge hoards of memory, because the semantics of normal

I don't follow; that is only true if your program allocates more memory than it
needs. In that case, the program is broken. Most programs immediately
initialize an allocated object with meaningful data. Overcommitment means that
such an initialization can fail even though the pointer returned was good.

>memory overcommitment with respect to whether you really have the memory
>you asked for are identical to those of COW page copying on fork(). And
>you really, *really* don't want to turn that off, unless you have dozens
>of gigabytes or more of swap just lying around to be wasted.

Not really; copying a page and committing it are two different things.  A
fork() could ensure that enough pages are reserved so that every page of the
parent could be copied, or else fail. You don't have to actually copy pages to
reserve them. You just have to record that they are reserved.  The usual copy
on write optimization still takes place.

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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


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