From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ingwwdf.sap-ag.de (ingwwdf.sap-ag.de [194.45.236.65]) by kvack.org (8.8.7/8.8.7) with ESMTP id DAA31556 for ; Fri, 26 Jun 1998 03:54:09 -0400 Subject: Re: Thread implementations... References: <199806240915.TAA09504@vindaloo.atnf.CSIRO.AU> <199806241213.WAA10661@vindaloo.atnf.CSIRO.AU> <199806242341.JAA15101@vindaloo.atnf.CSIRO.AU> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Christoph Rohland Date: 26 Jun 1998 09:53:08 +0200 In-Reply-To: ebiederm+eric@npwt.net's message of "24 Jun 1998 23:45:52 -0500" Message-Id: Sender: owner-linux-mm@kvack.org To: "Eric W. Biederman" Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org List-ID: ebiederm+eric@npwt.net (Eric W. Biederman) writes: > > MADV_DONTNEED > > Do not need these pages > > > The system will free any resident pages that are allo- > > cated to the region. All modifications will be lost > > and any swapped out pages will be discarded. Subse- > > quent access to the region will result in a zero-fill- > > on-demand fault as though it is being accessed for the > > first time. Reserved swap space is not affected by > > this call. > > This one is broken, for 3 reasons. > 1) madvise should only give advise. > 2) This can be done with mmap(start, len, PROT..., MAP_ANON, -1, 0) > 3) There is a more reasonable interpretation from IRIX: > > MADV_DONTNEED informs the system that the address range from addr to > addr + len will likely not be referenced in the near > future. The memory to which the indicated addresses are > mapped will be the first to be reclaimed when memory is > needed by the system. I do not agree: 1) why should madvise only advise. O.K. it is a naming thing, but I think you can find more terms which went far from the original meaning. 2) Would not work on shared pages. 3) Why is IRIX more reasonable than any other implementation? The functionality described in the OSF manpage greatly help transactional programs, which use loads of memory for single transactions. I do not know if it should be done with madvise, but there is at least one OS which thinks it is the right place and I would look for this functionality exactly there. Cheers Christoph -- #include