From: Rik van Riel <riel@conectiva.com.br>
To: linux-mm@kvack.org
Subject: pressuring dirty pages (2.3.99-pre6)
Date: Mon, 24 Apr 2000 16:54:38 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0004241650140.5572-200000@duckman.conectiva> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 934 bytes --]
Hi,
I've been trying to fix the VM balance for a week or so now,
and things are mostly fixed except for one situation.
If there is a *heavy* write going on and the data is in the
page cache only .. ie. no buffer heads available, then the
page cache will grow almost without bounds and kswapd and
the rest of the system will basically spin in shrink_mmap()...
What mechanism do we use to flush back dirty pages from eg.
mmap()s? How could I push those pages to disk the way we
do with buffers (by waking up bdflush)?
(yes, this is a big bug, please try the attached program by
Juan Quintela and set the #defines as wanted .. it'll make
painfully clear that this bug exists and should be fixed)
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
[-- Attachment #2: qmtest.c --]
[-- Type: TEXT/PLAIN, Size: 1153 bytes --]
/*
* Memory tester by Quintela.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#define FILENAME "/tmp/testing_file"
/* Put here 2times your memory or less */
#define SIZE (128 * 1024 * 1024)
void error_string(char *msg)
{
perror(msg);
exit(EXIT_FAILURE);
}
int main(int argc, char * argv[])
{
char *array;
int i;
int fd = open(FILENAME, O_RDWR | O_CREAT, 0666);
if (fd == -1)
error_string("Problems opening the file");
if (lseek(fd, SIZE, SEEK_SET) != SIZE)
error_string("Problems doing the lseek");
if (write(fd,"\0",1) !=1)
error_string("Problems writing");
array = mmap(0, SIZE, PROT_WRITE, MAP_SHARED,fd,0);
if (array == MAP_FAILED)
error_string("The mmap has failed");
for(i = 0; i < SIZE; i++) {
array[i] = i;
}
msync(array, SIZE, MS_SYNC);
close(fd);
exit(EXIT_SUCCESS);
}
next reply other threads:[~2000-04-24 19:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-24 19:54 Rik van Riel [this message]
2000-04-24 21:27 ` Stephen C. Tweedie
2000-04-24 22:42 ` Rik van Riel
2000-04-25 9:35 ` Stephen C. Tweedie
2000-04-25 15:25 ` Rik van Riel
2000-04-25 13:58 ` Eric W. Biederman
2000-04-25 14:27 Mark_H_Johnson.RTS
2000-04-25 16:30 ` Stephen C. Tweedie
2000-04-25 19:14 ` Eric W. Biederman
2000-04-25 19:47 ` Rik van Riel
2000-04-26 11:43 ` Stephen C. Tweedie
2000-04-26 11:06 ` Stephen C. Tweedie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0004241650140.5572-200000@duckman.conectiva \
--to=riel@conectiva.com.br \
--cc=linux-mm@kvack.org \
--cc=riel@nl.linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox