lkml.org 
[lkml]   [1999]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Removing swap lockmap...
On 19 Jan 1999, Zlatko Calusic wrote:

> Yes, this case probably doesn't get enough testing with my current
> setup, so it is quite hard (for me) to prove removing lockmap is
> no-no. Problem is that I don't understand shm swapping very well

Launch some time this proggy to try out shm swapping:

/*
* Copyright (C) 1999 Andrea Arcangeli
* shm swapout test
*/

#include <sys/ipc.h>
#include <sys/shm.h>

#define SIZE 16000000

main()
{
int shmid;
char *addr, *p;
if ((shmid = shmget(IPC_PRIVATE, SIZE, IPC_CREAT | 0644)) < 0)
perror("shmget");
if ((addr = shmat(shmid, NULL, 0)) < 0)
perror("shmat");
for (p = addr; p < addr + SIZE; p+=4096)
*p = 0;
}

To know if the lockmap is needed you can also reinsert the code and add a
printk() in the test_and_set_bit() path.

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.047 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site