public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: vda <vda@port.imtp.ilyichevsk.odessa.ua>
To: Dmitry Volkoff <vdb@mail.ru>, linux-kernel@vger.kernel.org
Subject: Re: Unfreeable buffer/cache problem in 2.4.17-rc1 still there
Date: Mon, 17 Dec 2001 15:01:12 -0200	[thread overview]
Message-ID: <01121715011208.02146@manta> (raw)
In-Reply-To: <20011216223909.A230@localhost>
In-Reply-To: <20011216223909.A230@localhost>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="PT 154", Size: 980 bytes --]

On Sunday 16 December 2001 17:39, Dmitry Volkoff wrote:
> Hello!
>
> Below is simple test case which I think is related to "memory disappear"
> problem.
>
> My real program is doing something like this:
>
> // test.c
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <unistd.h>
>
> int main(void)
> {
>   int fd;
>   int r;
>   char data[10] = "0123456789";
>   int i;
>   int end = 30;
>   for (i=0;i<end;i++) {
>     fd = open("testfile", O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);
>     if (fd == -1) {
>       printf("unable to open\n");
>       return;
>     }
>     r = write(fd,data,sizeof data);
>     if (r == -1) {
>       printf("unable to write\n");
>       close(fd);
>       return;
>     }
>     close(fd);
>     sleep(1);
>   }
> }
> // end test.c

I removed sleep(1). Is it needed?

After 10000+ runs of this proggy swap usage isn't changed on 2.4.17-pre7.
top reports constant 2304K of swap usage.
--
vda

  reply	other threads:[~2001-12-17 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-16 19:39 Unfreeable buffer/cache problem in 2.4.17-rc1 still there Dmitry Volkoff
2001-12-17 17:01 ` vda [this message]
2001-12-18  4:26   ` Dmitry Volkoff
  -- strict thread matches above, loose matches on Subject: below --
2001-12-16 20:41 Willy Tarreau
     [not found] <Pine.LNX.4.33.0112151141280.19022-100000@coffee.psychology.mcmaster.ca>
2001-12-15 17:09 ` Chris Chabot
2001-12-15 16:05 Ed Tomlinson
2001-12-15 12:36 Chris Chabot
     [not found] ` <004601c18567$a8be1600$0801a8c0@Stev.org>
2001-12-15 13:42   ` Chris Chabot
2001-12-15 14:24 ` Andrea Arcangeli
2001-12-15 16:05   ` Chris Chabot
2001-12-15 16:09     ` Ken Brownfield

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=01121715011208.02146@manta \
    --to=vda@port.imtp.ilyichevsk.odessa.ua \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vdb@mail.ru \
    /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