[Patch] shmem truncate optimizations and cleanup

2001-01-10 Thread Christoph Rohland
Hi Alan, The appended patch speeds up the truncate logic of shmem.c considerably and makes it more readable. Would you apply it to your -ac series? I will go on with some cache lookup optimizations and probably read/write support. Greetings Christoph diff -uNr

Re: Strange umount problem in latest 2.4.0 kernels

2001-01-11 Thread Christoph Rohland
On Fri, 12 Jan 2001, [EMAIL PROTECTED] wrote: Same cam be applied to shm ? Thus kernel Documentation/Changes should be changed: [...] none/dev/shmshm defaults0 0 to shm/dev/shmshm defaults0 0 Yes, I thought that I changed that :-( I always

[Patch] make shm filesystem part configurable

2001-01-13 Thread Christoph Rohland
Hi, The appended patch (additional to my read/write support patch) makes the shm filesystem configurable and renames it to the more sensible name swapfs. Since the fs type "shm" is quite established with 2.4 I register that name also. It also updates the documentation. Greetings

[Patch] read/write support for shm fs

2001-01-13 Thread Christoph Rohland
Hi Alan, Here is a patch which makes the shm fs a full swappable file system like Solaris' tmpfs. Does anybody have a really good fs check tool? Not benchmarking, but concurrent truncate, read, write, unlink stress test. Would be good to test it with that. I did my usual POSIX/SYSV shm tests

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

2001-01-13 Thread Christoph Rohland
David Ford [EMAIL PROTECTED] writes: Now...is this shared memory or swap? If it's swap, why is it different than a swapfile? If you are intending the shmem be called swapfs, I personally thing that it'll cause a significant amount of confusion. It is a filesystem which lives in RAM and

[patch] symlink creation broken in shmem.c

2001-01-13 Thread Christoph Rohland
Hi Linus, The shmem_symlink function is completely broken in 2.4.0 and never worked. This patch removes the function from 2.4.0 Greetings Christoph P.S.: For those which test read/write support patch: I will post patch for my swapfs soon which will make it working on top

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

2001-01-13 Thread Christoph Rohland
David Ford [EMAIL PROTECTED] writes: Hmm, ok, what are the activities that use this other than shm? You can e.g. use it for your /tmp filesystem. there seem to be some people out there which used ramfs for that... What do you think about "vmfs"? This probably reflects its nature better than

[Patch] symlink fix for shm/swap fs

2001-01-13 Thread Christoph Rohland
Hi Alan, Here comes a patch which fixes the totally broken symlink support in shm/swapfs. It is additional to my former patches for read and write support. It survives now a parallel kernel make on my 8way. Greetings Christoph diff -uNr

Re: Linux 2.4.0-ac9

2001-01-14 Thread Christoph Rohland
Steven Cole [EMAIL PROTECTED] writes: Here is a little patch which also fixes the symptoms of the build problem, and makes a kernel 1510 bytes smaller (without CONFIG_SWAPFS). Someone more knowlegable than I will have to verify its correctness. Thanks, this is correct. I did not test the

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

2001-01-14 Thread Christoph Rohland
Hi Albert, "Albert D. Cahalan" [EMAIL PROTECTED] writes: Admins already know what "tmpfs" means, so you should just call your filesystem that. I know it isn't a pretty name, but in the interest of reducing confusion, you should use the existing name. Don't think of it as just "for /tmp".

SetPageDirty in shmem_nopage

2001-01-14 Thread Christoph Rohland
Hi Linus, While playing with the shmem read/write support I realised that the accounting for shmem is broken: Since we do not mark the page dirty at allocation time the vm can drop it at any time as long as it is not written to. But shmem never adjusts its accounting to that and will happily

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

2001-01-14 Thread Christoph Rohland
Dominik Kubla [EMAIL PROTECTED] writes: Well, it's tmpfs not only on SUN but for *BSD too. So i guess we should follow the pack and use this name to avoid yet another "it's called this under that Unix and this under the other and something else under Linux" case. So does *BSD also have the

Re: SetPageDirty in shmem_nopage

2001-01-14 Thread Christoph Rohland
Linus Torvalds [EMAIL PROTECTED] writes: On 14 Jan 2001, Christoph Rohland wrote: Why do you increment the use counter at all in nopage? First to be able to limit the overall number of pages used by the filesystem and second to have the right value for the number of blocks in [f]stat. Show

[Patch] memparse should return long long

2001-01-15 Thread Christoph Rohland
Hi, The following patch lets memparse return a long long. This is needed to use mem= on highmem machines. Greetings Christoph diff -uNr 2.4.0-ac/arch/i386/kernel/setup.c 2.4.0-ac-memparse/arch/i386/kernel/setup.c --- 2.4.0-ac/arch/i386/kernel/setup.c Tue Jan 2 21:57:54 2001

Re: linmodem????

2001-01-15 Thread Christoph Rohland
Hi Alan, On 15 Jan 2001, Alan Shutko wrote: http://walbran.org/sean/linux/stodolsk/ Haven't tried it, but it claims to work. Works for me. Greetings Christoph - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

Re: [Patch] memparse should return long long

2001-01-15 Thread Christoph Rohland
Hi Randy, On Mon, 15 Jan 2001, Randy Dunlap wrote: Why not (?): Because I did not need it (always used #G or #M) and did not know the function. But it's apparently correct to use simple_strtoull. diff -uNr 2.4.0-ac/lib/cmdline.c 2.4.0-ac-memparse/lib/cmdline.c --- 2.4.0-ac/lib/cmdline.c

Re: Bug in swapfs (2.4.0-ac9)

2001-01-16 Thread Christoph Rohland
Hi Gregor, On Mon, 15 Jan 2001, Gregor Jasny wrote: I think I've found a bug in swapfs: fstab: swapfs /dev/shmswapfs defaults 0 0 swapfs /tmpswapfs defaults 0 0 When I hit enter on a tar.gz file in Midnight Commander nothing happens. If I do a umonut /tmp

[Patch] shmem fixes for 2.4.1-pre7

2001-01-16 Thread Christoph Rohland
Hi Linus, Here is a patch against 2.4.1-pre7 which 1) Adds prototype for shmem_lock to mm.h 2) Again brings the fixes for the accounting. I still think it should be applied. Greetings Christoph diff -uNr 1-pre7/include/linux/mm.h m1-pre7/include/linux/mm.h ---

[Patch2] shmem fixes for 2.4.1-pre7

2001-01-16 Thread Christoph Rohland
On 16 Jan 2001, Christoph Rohland wrote: Here is a patch against 2.4.1-pre7 which 1) Adds prototype for shmem_lock to mm.h 2) Again brings the fixes for the accounting. I still think it should be applied. And of course the prototype should be extern... Greetings

[patch] swapfs fixes against and comments on ac9

2001-01-16 Thread Christoph Rohland
Hi Alan, Here comes a patch for swapfs which has all my fixes against -ac9. It does the following: - Fix IPC_LOCK (also in 2.4.1-pre7) - Do accounting right (Also send to Linus) - memparse returns unsigned long long (Also send to Linus) - Fix the unresolved symbols w/o CONFIG_SWAPFS - Introduce

[patch2] swapfs fixes against ac9

2001-01-16 Thread Christoph Rohland
Hi Alan, On 16 Jan 2001, Christoph Rohland wrote: Hi Alan, Here comes a patch for swapfs which has all my fixes against -ac9. It does the following: - Fix IPC_LOCK (also in 2.4.1-pre7) - Do accounting right (Also send to Linus) - memparse returns unsigned long long (Also send to Linus

Re: VM subsystem bug in 2.4.0 ?

2001-01-18 Thread Christoph Rohland
Hi Rik, On Wed, 17 Jan 2001, Rik van Riel wrote: I don't even want to start thinking about how this would screw up the (already fragile) page aging balance... As of 2.4.1-pre we pin the pages by increasing the page count for locked segments. No special list needed. Greetings

Re: set_page_dirty/page_launder deadlock

2001-01-19 Thread Christoph Rohland
Hi Linus, On Sun, 14 Jan 2001, Linus Torvalds wrote: Well, as the new shm code doesn't return 1 any more, the whole locked page handling should just be deleted. ramfs always just re-marked the page dirty in its own "writepage()" function, so it was only shmfs that ever returned this special

Re: 2.4.4 kernel freeze for unknown reason

2001-05-13 Thread Christoph Rohland
Hi Mike, On Sat, 12 May 2001, Mike Galbraith wrote: Why do I not see this behavior with a heavy swap throughput test load? It seems decidedly odd to me that swapspace should remain allocated on other folks lightly loaded boxen given that my heavily loaded box does release swapspace quite

Assorted tmpfs fixes

2001-05-15 Thread Christoph Rohland
Fri May 4 21:37:34 2001 +++ 2.4.4-mSsua/mm/shmem.c Mon May 7 11:13:27 2001 @@ -3,7 +3,8 @@ * * Copyright (C) 2000 Linus Torvalds. * 2000 Transmeta Corp. - * 2000 Christoph Rohland + * 2000-2001 Christoph Rohland + * 2000-2001 SAP AG

[Patch] allow tmpfs bigger than 1GB on s390x

2001-05-15 Thread Christoph Rohland
Hi Martin, Here is the patch which implements triple indirect blocks in tmpfs. For the rest of the word: This is needed since s390x is a 64 Bit platform with pagesize of 4k :-( It is on top of my other tmpfs fixes which you can find at ftp://ftp.sap.com/pub/linuxlab/people/cr Greetings

Re: [PATCH] rootfs (part 1)

2001-05-16 Thread Christoph Rohland
Hi Al, On Wed, 16 May 2001, Alexander Viro wrote: One point that might be better done differently - since we need ramfs for boot I've just made fs/Config.in declare CONFIG_RAMFS as define_bool CONFIG_RAMFS y. If ramfs grows (e.g. gets resource limits patches from -ac) we might be

Re: [PATCH] rootfs (part 1)

2001-05-16 Thread Christoph Rohland
Hi Linus, On Wed, 16 May 2001, Linus Torvalds wrote: Looks ok, but it also feels like 2.5.x stuff to me. Also, there's the question of whether to make ramfs just built-in, or make _tmpfs_ built in - ramfs is certainly simpler, but tmpfs does the same things and you need that one for

Re: [PATCH] rootfs (part 1)

2001-05-16 Thread Christoph Rohland
Hi Linus, On Wed, 16 May 2001, Linus Torvalds wrote: On 16 May 2001, Christoph Rohland wrote: cr:/speicher/src/u4ac9 $ ls -l mm/shmem.o* -rw-r--r--1 cr users 154652 Mai 16 19:27 mm/shmem.o-tmpfs -rw-r--r--1 cr users 180764 Mai 16 19:24 mm/shmem.o+tmpfs cr

Re: [PATCH] rootfs (part 1)

2001-05-16 Thread Christoph Rohland
Hi Alexander, On Wed, 16 May 2001, Alexander Viro wrote: Because what I need is an absolute minimum. Heck, I don't even use regular files (in the full variant of patch, that is). They might become useful, but I can live with mkdir() and mknod(). So what about adding shmem_mknod and

Re: [PATCH] rootfs (part 1)

2001-05-17 Thread Christoph Rohland
Hi Alan, On Thu, 17 May 2001, Alan Cox wrote: I think you have a major tool problem. bash-2.04$ size mm/shmem.o text data bss dec hex filename 7422 572 079941f3a mm/shmem.o bash-2.04$ size fs/ramfs/ramfs.o text data bss

[Patch] ramfs accounting in -ac broken

2001-05-17 Thread Christoph Rohland
Hi Alan, The ramfs accounting is broken for shared mmaps. It simply does not recognize the pages allocated by writing into a shared mapping but takes them into account when freed. The attached patch should fix that. Greetings Christoph --- 4-ac9/fs/ramfs/inode.c Thu May

[Patch] tmpfs accounting cleanup for -ac series

2001-05-17 Thread Christoph Rohland
Hi Alan, While looking at the -ac version of ramfs I noticed that there is a new address operation introduced which I can use to cleanup shmem. This patch throws away some magic recalculation and makes the accounting of shmem accurate. It also encapsulates all accesses to the superblock_info

Re: tmpfs + sendfile bug ?

2001-05-21 Thread Christoph Rohland
Hi Pierre, On Mon, 21 May 2001, Pierre Etchemaite wrote: I just found a problem GETting a file stored in tmpfs using proftpd; I always get a 426 Transfer aborted. Data connection closed. That could be a bug with tmpfs and sendfile in 2.4.5-pre4 : [...] read(8,

Re: tmpfs + sendfile bug ?

2001-05-22 Thread Christoph Rohland
Hi Linus, On Mon, 21 May 2001, Linus Torvalds wrote: In article [EMAIL PROTECTED], Christoph Rohland [EMAIL PROTECTED] wrote: tmpfs does not provide the necessary functions for sendfile and lo: readpage, prepare_write and commitwrite. And I do not see a way how to provide readpage in tmpfs

Re: Speed increase on SMP in 2.4.0 test 6 and up

2000-09-01 Thread Christoph Rohland
Michael Bielicki [EMAIL PROTECTED] writes: Was done but Informix DS 7.3 still sees no shared memory. Either I did something wrong in the compile or I don't know. I am preparing straces since two members of the list offered to look into them. What I also don't understand is the ouput of df on

Re: thread rant

2000-09-03 Thread Christoph Rohland
Richard Gooch [EMAIL PROTECTED] writes: Ingo Molnar writes: yep - and this isnt possible with traditional SysV shared memory, and isnt possible with traditional SysV semaphores. (forget my filesystem comment, it's a thinko.) Huh? After attaching, if you "delete" a SHMID, it will be

Re: Notebook disk spindown

2000-09-09 Thread Christoph Rohland
Russell King [EMAIL PROTECTED] writes: Jamie Lokier writes: With laptops, people are willing to assume the RAM is reliable -- accidentally pulling the plug out won't lose the data. But a buggy apm implementation and the battery running down can. (and I've seen my Thinkpad 380XD with

Re: Update Linux 2.4 Status/TODO list

2000-09-17 Thread Christoph Rohland
[EMAIL PROTECTED] writes: * SHM segments not always being detached and destroyed right ? (problem reported by Lincoln Dale) This problem is not reproducible AFAIK. I did not get any error report for the latest kernels and Lincoln also said he could not reproduce it on the latest

new MM and shared memory

2000-09-19 Thread Christoph Rohland
Hi Rik et al. As stated before the new mm does break shm swapping. Under the ipctst program driving my machine into swap I get the appended console output. After this it locked up. I can make it run longer by giving mem= with less memory. Greetings Christoph -- LILO boot:

Re: new MM and shared memory

2000-09-22 Thread Christoph Rohland
Rik van Riel [EMAIL PROTECTED] writes: On 19 Sep 2000, Christoph Rohland wrote: As stated before the new mm does break shm swapping. Under the ipctst program driving my machine into swap I get the appended console output. After this it locked up. I can make it run longer by giving

Re: problem with 2.4.0-test9-pre6 seems to be SHM

2000-09-25 Thread Christoph Rohland
Hi David, David Ford [EMAIL PROTECTED] writes: I think it's time to get Christoph on the line and see what he has to say. The 4096 number is a limit to the system, you can have a max of 4096 shared memory segments systemwide. Do you know offhand which programs are using(abusing) shm?

Re: problem with 2.4.0-test9-pre6 seems to be SHM

2000-09-25 Thread Christoph Rohland
safemode [EMAIL PROTECTED] writes: The sum of the Bytes used in the 4096 entries ipcs shows is WAY off from the bytes used in df if that's what you wanted to know.df shows 109K in use... and that's easily beaten by the first entry in ipcs -- Shared Memory Segments key

Re: the new VM

2000-09-26 Thread Christoph Rohland
Hi Rik, Rik van Riel [EMAIL PROTECTED] writes: Because as you said the machine can lockup when you run out of memory. The fix for this is to kill a user process when you're OOM (you need to do this anyway). The last few allocations of the "condemned" process can come frome the

Re: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks

2000-09-26 Thread Christoph Rohland
Andrea Arcangeli [EMAIL PROTECTED] writes: Could you tell me what's wrong in having an app with a 1.5G mapped executable (or a tiny executable but with a 1.5G shared/private file mapping if you prefer), O.K. that sound more reasonable. I was reading image as program text... and a 1.5GB

Re: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks

2000-09-27 Thread Christoph Rohland
Andrea Arcangeli [EMAIL PROTECTED] writes: Said that I heard of real world programs that have a .text larger than 2G =:-O I know Oracle (and most other DB) are very shm intensive. However the fact you say the shm is not locked in memory is really a news to me. I really remembered that the

Re: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks

2000-09-27 Thread Christoph Rohland
Ingo Molnar [EMAIL PROTECTED] writes: On 27 Sep 2000, Christoph Rohland wrote: Nobody should rely on shm swapping for productive use. But you have changing/increasing loads on application servers and out of a sudden you run oom. In this case the system should behave and it is _very_

Re: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks

2000-09-27 Thread Christoph Rohland
Andrea Arcangeli [EMAIL PROTECTED] writes: On Wed, Sep 27, 2000 at 10:11:43AM +0200, Christoph Rohland wrote: I just checked one oracle system and it did not lock the memory. And I If that memory is used for I/O cache then such memory should released when the system runs into swap instead

Re: Corruption on database

2000-10-02 Thread Christoph Rohland
Hi Markus, Markus Döhr [EMAIL PROTECTED] writes: We're currently in the process switching our SAP R/3 systems over to linux. Database is SAPDB (former ADABAS). The size is about 125 GB. For storing RAW DEVSPACES are used (2 x RAID-5, 1 x RAID-1). We have problems with the database under

Re: Corruption on database

2000-10-02 Thread Christoph Rohland
Christoph Rohland [EMAIL PROTECTED] writes: I do not think that this is Linux kernel related. There was a bug in the SAPDB kernel with raw devices. Actually I have to correct myself :-( I do not know what's happening. The fixed error was _not_ about this problem. We will investigate further

Re: [PATCH] fix for VM test9-pre7

2000-10-02 Thread Christoph Rohland
Hi Rik, the shm swapping still kills the machine(8GB mem) the machine with somthing like '__alloc_pages failed order 0'. When I do the same stresstest with mmaped file in ext2 the machine runs fine but the processes do not do anything and vmstat/ps lock up on these processes. Greetings

Re: [PATCH] fix for VM test9-pre7

2000-10-04 Thread Christoph Rohland
Rik van Riel [EMAIL PROTECTED] writes: On 2 Oct 2000, Christoph Rohland wrote: the shm swapping still kills the machine(8GB mem) the machine with somthing like '__alloc_pages failed order 0'. When I do the same stresstest with mmaped file in ext2 the machine runs fine

destroyed shm segments in 2.2

2000-10-04 Thread Christoph Rohland
Hi Alan, We just stumbled over the Linux 2.2 behaviour that you cannot create a shm segment with a key of a destroyed segment. This breaks some applications. Could we change the behaviour in 2.2 like we did it in 2.3 and make it more compatible with other UN*Xes? The attached (untested) patch

Re: the new VM

2000-10-09 Thread Christoph Rohland
Rik van Riel [EMAIL PROTECTED] writes: Hmmm, could you help me with drawing up a selection algorithm on how to choose which SHM segment to destroy when we run OOM? The criteria would be about the same as with normal programs: 1) minimise the amount of work lost 2) try to protect

Re: bind() allowed to non-local addresses

2000-10-19 Thread Christoph Rohland
[EMAIL PROTECTED] writes: Hello! Using linux-2.4.0-test9, bind() incorrectly allows a bind to a non-local address. The correct behavior should be a return code of -1 with errno set to EADDRNOTAVAIL. You can bind to any address, it is your right. You will not able to receive on or

Re: bind() allowed to non-local addresses

2000-10-19 Thread Christoph Rohland
"David S. Miller" [EMAIL PROTECTED] writes: Date: Thu, 19 Oct 2000 09:07:57 -0600 From: Matt Peterson [EMAIL PROTECTED] Hence, the JVM fails compatibility on Linux 2.4. Due ot this and other reasons I'm restoring the 2.2.x behavior by default, but adding a sysctl so that

Re: Kernel is unstable

2001-03-02 Thread Christoph Rohland
Hi Linus, On 1 Mar 2001, Linus Torvalds wrote: Note how do_brk() does the merging itself (see the comment "Can we just expand an old anonymous mapping?"), and that it's basically free when done that way, with no worries about locking etc. The same could be done fairly trivially in mmap too,

Re: 2.4 and 2GB swap partition limit

2001-03-05 Thread Christoph Rohland
Hi Matt, On Sun, 4 Mar 2001, Matt Domsch wrote: My concern is that if there continues to be a 2GB swap partition/file size limitation, and you can have (as currently #defined) 8 swap partitions, you're limited to 16GB swap, which then follows a max of 8GB RAM. We'd like to sell servers with

Re: 2.4.0-test5 bug: invalid shmid_kernel passed to shm_nopage_core

2000-11-25 Thread Christoph Rohland
Hi Kevin, [EMAIL PROTECTED] (Kevin Buhr) writes: The SHM locking has thwarted my attempts at understanding. Maybe someone else can see the bug or reassure me that it's already been fixed in test11? This is the first report of such corruption. If it's real it is _not_ fixed between test5 and

Re: 2.4.0-test5 bug: invalid shmid_kernel passed to shm_nopage_core

2000-11-26 Thread Christoph Rohland
Hi Kevin, [EMAIL PROTECTED] (Kevin Buhr) writes: I know no way to reproduce it. I've been using "test5" reliably since just after its release, and I've triggered this bug only the one time. That's what I feared :-( I use a SysReq patch to do an oops-style dump instead of the usual

[PATCH,preliminary] cleanup shm handling

2000-12-08 Thread Christoph Rohland
Luc Boyard [EMAIL PROTECTED] * HIGHMEM support, Ingo Molnar [EMAIL PROTECTED] - * avoid vmalloc and make shmmax, shmall, shmmni sysctl'able, - * Christoph Rohland [EMAIL PROTECTED] * Shared /dev/zero support, Kanoj Sarcar [EMAIL PROTECTED] - * make it a file system, Chri

Re: [PATCH,preliminary] cleanup shm handling

2000-12-08 Thread Christoph Rohland
David Howells [EMAIL PROTECTED] writes: Can you help me with an SHM related problem? I'm currently writing a Win32 emulation kernel module to help speed Wine up, and I'm writing the file mapping support stuff at the moment (CreateFileMapping and MapViewOfFile). These two calls were

Re: [PATCH,preliminary] cleanup shm handling

2000-12-13 Thread Christoph Rohland
Hi David, On Wed, 13 Dec 2000, David Howells wrote: I'm currently writing a Win32 emulation kernel module to help speed Wine up, ^ fd = shm_open ("xxx",...) ptr = mmap (NULL, size, ..., fd, offset); I am doing this from within kernel

Re: [PATCH,preliminary] cleanup shm handling

2000-12-13 Thread Christoph Rohland
Hi David, On Wed, 13 Dec 2000, David Howells wrote: Looks interesting. There looks to be a logical mapping between CreateFileMapping() + MEM_SHARED and your shmem_file_setup(), as long as anonymously named sections are catered for (not difficult). Yup. There also looks to be a logical

[PATCH] shm cleanup (2)

2000-12-13 Thread Christoph Rohland
000 @@ -9,23 +9,10 @@ * BIGMEM support, Andrea Arcangeli [EMAIL PROTECTED] * SMP thread shm, Jean-Luc Boyard [EMAIL PROTECTED] * HIGHMEM support, Ingo Molnar [EMAIL PROTECTED] - * avoid vmalloc and make shmmax, shmall, shmmni sysctl'able, - * Christoph Rohland [EMAIL

[Patch] shm cleanup

2000-12-17 Thread Christoph Rohland
EM support, Ingo Molnar [EMAIL PROTECTED] - * avoid vmalloc and make shmmax, shmall, shmmni sysctl'able, - * Christoph Rohland [EMAIL PROTECTED] + * Make shmmax, shmall, shmmni sysctl'able, Christoph Rohland [EMAIL PROTECTED] * Shared /dev/zero support, Kanoj Sarcar [EMAIL PROTECTE

Re: [Patch] shm cleanup

2000-12-17 Thread Christoph Rohland
Linus Torvalds [EMAIL PROTECTED] writes: The only comment I have is that as far as I can tell, your shm_writepage() has a small bug: if "__get_swap_page()" fails, we can't just drop the dirty page in question, so instead of returning -ENOMEM we should really return a "1" to tell the VM to

Re: test13-pre3

2000-12-18 Thread Christoph Rohland
Hi Linus, On Sun, 17 Dec 2000, Linus Torvalds wrote: The shmfs cleanup should be unnoticeable except to users who use SAP with huge shared memory segments, where Christoph Rohlands work not only makes the code much more readable, it should also make it dependable.. :-) The appended patch

Re: Problem with SYSV IPC

2000-12-18 Thread Christoph Rohland
Hi Janne, On 21 Nov 2000, Janne Himanka wrote: I have compiled 2.4.0-test10 and 2.4.0-test11 kernels, mounted /dev/shm and tried to install the Perl IPC::Shareable module. "make test" produces a lot of errors (sample below), and a message from the kernel appears in /var/log/messages. I am

Re: [PATCH] Make devfs create /dev/shm (was: Re: Trashing ext2 with hdparm) )

2000-12-18 Thread Christoph Rohland
Hi Roderich, On Fri, 08 Dec 2000, Roderich Schupp wrote: And I'll ask again... If this is now the recommend mount point, can we have devfs create this directory for us? C'mon guys, this is just to easy: Included in 2.4.0-test13-pre3... Greetings Christoph - To

Re: problem with shmat () and 1GB memory in kernel 2.2.17

2000-12-18 Thread Christoph Rohland
Hi Rolf, On Wed, 8 Nov 2000, Rolf Fokkens wrote: Recently we installed extra memory in our Oracle-on-Linux database server, it now has 1.25 GB. I installed a 2.2.17 kernel with the 2GB option enabled. I rebooted the machine (a Compaq Proliant 5500 dual PII 450MHz) and noticed that one of the

Re: test13-pre3

2000-12-18 Thread Christoph Rohland
Hi Linus, On 18 Dec 2000, Christoph Rohland wrote: The appended patch fixes the following: 1) We cannot unlock the page in shmem_writepage on ooswap since page_launder will do this later. 2) We should set the inode number of SYSV segments to the (user) shmid and not the internal

Re: 2.4.0-test5 bug: invalid shmid_kernel passed to shm_nopage_core

2000-12-19 Thread Christoph Rohland
Hi Kevin, On 26 Nov 2000, Kevin Buhr wrote: The fact that this has crashed once in all the time I've been using this setup would seem to imply a very subtle race condition. Ugh. I am just running a stress test on 2.4.0-test13-pre3 + appended patch without problems. Is the shm segment deleted

IPC_RMID should not block the key

2000-12-19 Thread Christoph Rohland
Hi Alan, here is a patch against 2.2.18 to resemble the same behaviour for 2.2 as we have in 2.4. This is what everybody else does and the 2.2 behaviour leads to some really bad situations. Greetings Christoph diff -uNr 2.2.18/ipc/shm.c c/ipc/shm.c --- 2.2.18/ipc/shm.cWed

Sparse cores for 2.2

2000-12-19 Thread Christoph Rohland
Hi Alan, Here is a backport of the sparse core writing for 2.2. It never made any problems on 2.[34] and makes live much easier for us. Could you apply this to 2.2.19? Greetings Christoph diff -uNr 2.2.18/fs/binfmt_elf.c c/fs/binfmt_elf.c --- 2.2.18/fs/binfmt_elf.c Mon

Re: 2.4.0-test5 bug: invalid shmid_kernel passed to shm_nopage_core

2000-12-19 Thread Christoph Rohland
Hi Kevin, On 19 Dec 2000, Kevin Buhr wrote: The code in Enlightenment did a complete shmget/shmat/shmctl(RMID)/shmdt cycle, so that segment *was* being constantly deleted. The Mozilla ones stuck around. The particular address that was being reference in the shm_nopage_core call

Re: Oops with 2.4.0-test13pre3 - swapoff

2000-12-22 Thread Christoph Rohland
Marcelo Tosatti [EMAIL PROTECTED] writes: Christoph is already looking at it and should have a fix soon. Here it comes against 13-pre4 ... We cannot call delete_from_swap_cache, it was called already in try_to_unuse. There is still a race when we page in the page which is just freed in

Re: shmat returning NULL with 0 sized segment

2000-12-26 Thread Christoph Rohland
Dave Gilbert [EMAIL PROTECTED] writes: I'm trying to debug a weird problem with Xine - its screwing up its use of shared memory for regions I haven't sussed yet. One odd consequence is that it has apparently successfully managed to allocate a 0 byte chunk of shared memory; shmat is then

Re: [PATCH,preliminary] cleanup shm handling

2000-12-08 Thread Christoph Rohland
Hi Linus, Linus Torvalds [EMAIL PROTECTED] writes: On 8 Dec 2000, Christoph Rohland wrote: here is my first shot for cleaning up the shm handling. It did survive some basic testing but is not ready for inclusion. The only comment I have right now is that you probably should not mark

[Patch] shmmin behaviour back to 2.2 behaviour

2000-12-27 Thread Christoph Rohland
Hi Linus, The following patchlet bring the handling of shmget with size zero back to the 2.2 behaviour. There seem to be programs out, which (erroneously) rely on this. Greetings Christoph diff -uNr c/include/linux/shm.h c1/include/linux/shm.h --- c/include/linux/shm.h

[Patch] shmem_unuse race fix

2000-12-27 Thread Christoph Rohland
Hi Linus, The following patch (against clean test13-pre4) removes the races in shmem_unuse. I changed inode.c to not lock the inode if there is no write_inode function. So I can grab the inode while holding the spinlock. It also optimises the shmem_ftruncate behaviour. BTW: The generic swapoff

Re: [Patch] shmmin behaviour back to 2.2 behaviour

2000-12-27 Thread Christoph Rohland
Dave Gilbert [EMAIL PROTECTED] writes: I think I've come to the conclusion that Xine does not in the case I've found, rely on this - it is a separate bug related to Xv telling xine that it needs 0 bytes. Yes, but this bug did not show on 2.2. It simply failed in shmget. Probably it makes

Re: [Patch] shmmin behaviour back to 2.2 behaviour

2000-12-27 Thread Christoph Rohland
Marcelo Tosatti [EMAIL PROTECTED] writes: On 27 Dec 2000, Christoph Rohland wrote: The following patchlet bring the handling of shmget with size zero back to the 2.2 behaviour. There seem to be programs out, which (erroneously) rely on this. Just curiosity: do you know if any

Re: [Patch] shmem_unuse race fix

2000-12-27 Thread Christoph Rohland
Marcelo Tosatti [EMAIL PROTECTED] writes: I think that incrementing the swap entry count will not allow swap from removing the swap entry (as the comment says) I think the culprit is somewhere else. The error occurs in nopage of a process, not in swapoff. Looking at the following in

Re: [Patch] shmmin behaviour back to 2.2 behaviour

2000-12-28 Thread Christoph Rohland
Andries Brouwer [EMAIL PROTECTED] writes: On Wed, Dec 27, 2000 at 01:16:44PM -0200, Marcelo Tosatti wrote: I happen to see this post, but have not followed earlier discussion. See a patch fragment (The patch does not show a lot of context. You should look at the whole files)

Re: [Patch] shmem_unuse race fix

2000-12-28 Thread Christoph Rohland
Linus Torvalds [EMAIL PROTECTED] writes: On 27 Dec 2000, Christoph Rohland wrote: Woul dyou mind testing this alternate fix instead: Does not work, but is the right direction I think. First we need the following patch since otherwise we use a swap entry without having the count increased

Re: [Patch] shmem_unuse race fix

2000-12-28 Thread Christoph Rohland
Linus Torvalds [EMAIL PROTECTED] writes: On 28 Dec 2000, Christoph Rohland wrote: First we need the following patch since otherwise we use a swap entry without having the count increased: No, that shouldn't be needed. Look at the code-path: the kernel has the page locked, so

Re: [Patch] shmmin behaviour back to 2.2 behaviour

2000-12-28 Thread Christoph Rohland
Alan Cox [EMAIL PROTECTED] writes: There are fundmental things shm* can do that mmap cannot. Does posix shm handle those (leaving segments alive but unattached being the obvious one) Yes: shmget == shm_open (+ ftruncate(fd, size)) shmat== mmap (0, size,

Re: innd mmap bug in 2.4.0-test12

2000-12-29 Thread Christoph Rohland
Chris Wedgwood [EMAIL PROTECTED] writes: I would prefer we leave ramfs alone as is -- it makes an excellent starting point for a new fs and is fairly simple to grok. If we are to add any more complexity here like the size limiting patches or the use of a backing store, I'd like to have this

Re: 2.4.0-prerelease shmget woes.

2001-01-02 Thread Christoph Rohland
Gregory McLean [EMAIL PROTECTED] writes: cat /proc/sys/kernel/shmall 0 That's your problem. Your limit for overall shm pages is zero. So you cannot allocate any shm segments. echo 200 /proc/sys/kernel/shmall and check /etc/sysctl.conf or wherever your system stores kernel parameters to

Re: strange swap behaviour - test11pre4

2001-01-03 Thread Christoph Rohland
Craig Schlenter [EMAIL PROTECTED] writes: [snip, vmstat stuff, me] There is a perl program running (80 Meg's in size, 20 Megs resident) that is chatting to a database and building up a large hash in memory. The machine has 64M of RAM. The bit that doesn't make sense is why the cache is

Re: [PATCH] filemap_fdatasync related changes

2001-01-04 Thread Christoph Rohland
Chris Mason [EMAIL PROTECTED] writes: Just noticed the filemap_fdatasync code doesn't check the return value from writepage. Linus, would you take a patch that redirtied the page, puts it back onto the dirty list (at the tail), and unlocks the page when writepage returns 1? That would

Re: SHM Not working in 2.4.0-prerelease

2001-01-04 Thread Christoph Rohland
"Albert D. Cahalan" [EMAIL PROTECTED] writes: [spstarr@coredump /etc]$ free total used free sharedbuffers ... the shmfs is mounted. Is there any configuration i need to get shm memory activiated? The 'shared' field in /proc/meminfo (source for 'top'

Re: [PATCH] filemap_fdatasync related changes

2001-01-04 Thread Christoph Rohland
Chris Mason [EMAIL PROTECTED] writes: Yes, right now the shmem writepage calls are the only ones returning one at all. But, the question of how to properly fsync/msync these kinds of pages still stands. Returning from an fsync before writing them isn't correct. Yes, and [fm]sync should not

Re: [PATCH] svgalib error in mmap documentation

2001-01-07 Thread Christoph Rohland
Matan Ziv-Av [EMAIL PROTECTED] writes: I hope it is reasonable to ask, how? What I need is to allocate a big amount of memory (say 1MB, for example), copy the video memory to it, and then have fixed 64K of virutal address of the process point to any 64K window of the large allocated

Re: Patch (repost): cramfs memory corruption fix

2001-01-08 Thread Christoph Rohland
Hi Linus, On Sun, 7 Jan 2001, Linus Torvalds wrote: I wonder what to do about this - the limits are obviously useful, as would the "use swap-space as a backing store" thing be. At the same time I'd really hate to lose the lean-mean-clean ramfs. Let me repeat on this issue: shmem.c has

Re: Patch (repost): cramfs memory corruption fix

2001-01-08 Thread Christoph Rohland
Hi Christoph, On Mon, 8 Jan 2001, Christoph Hellwig wrote: I had a prototype tmpfs in -test10 (ro so) times. It based on ramfs for all the metadata stuff and used the (old) shmfs code for swap-backed data. The only real problem the code had, was that it needed a -allocpage address_space

Re: Patch (repost): cramfs memory corruption fix

2001-01-08 Thread Christoph Rohland
Hi Alan, On Mon, 8 Jan 2001, Alan Cox wrote: I have been thinking about this. I think we should merge the size limiting code with the example clean ramfs code. Having spent a while debugging the LFS checks and some other funnies I realised one problem with the ramfs in 2.4.0 as an example.

Re: VM subsystem bug in 2.4.0 ?

2001-01-08 Thread Christoph Rohland
Hi Rik, On Mon, 8 Jan 2001, Rik van Riel wrote: And when the bit changes again, the page can be evicted from memory just fine. In the mean time, the locked pages will also have undergone normal page aging and at unlock time we know whether to swap out the page or not. I agree that this

Re: VM subsystem bug in 2.4.0 ?

2001-01-09 Thread Christoph Rohland
Hi Stephen, On Tue, 9 Jan 2001, Stephen C. Tweedie wrote: But again, how do you clear the bit? Locking is a per-vma property, not per-page. I can mmap a file twice and mlock just one of the mappings. If you get a munlock(), how are you to know how many other locked mappings still exist?

  1   2   3   4   >