From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [PATCH] kanoj-mm21-2.3.23 alow larger sizes to shmget() References: <199911011700.JAA70685@google.engr.sgi.com> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Christoph Rohland Date: 03 Nov 1999 10:06:12 +0100 In-Reply-To: kanoj@google.engr.sgi.com's message of "Mon, 1 Nov 1999 09:00:15 -0800 (PST)" Message-ID: Sender: owner-linux-mm@kvack.org Return-Path: To: Kanoj Sarcar Cc: linux-mm@kvack.org List-ID: Hi Kanoj, apparently my Mail got somehow broken up during transfer. At least I could not read my comments in the version from the list so I resend my comments. Grettings Christoph kanoj@google.engr.sgi.com (Kanoj Sarcar) writes: > > > > Hi Kanoj, > > > > This is probably breaking user space applications since shmid_ds is > > shared with user space in shmctl(2). On 32bit machines this does not > > matter, since sizeof(int) == sizeof(size_t), but on 64bit this will > > break. > > > > How do we handle this? > > Unfortunately, I don't think we can prevent this 64bit ABI breakage, if > we want to conform to the single unix spec on those platforms. Its > probably a good idea to have the ia64 port be SUS compliant, even though > sparc64/alpha are currently not. > > If it is really important to preserve the 64bit ABI, there's one more > alternative: preserve the shmget() api/abi on the old 64bit platforms, but > be compliant on the 32 bit ones and newer 64 bit ones (mips64/ia64). This > is not the cleanest solution, but can be done with a little header file > reorganization in include/linux/shm.h and include/linux/shmparam.h. > > Linus has put this patch into pre-25, lets talk if it is important to > do the above ... it shouldn't take me more than a couple of hours to > do it, if we so decided. Since glibc is encapsulating these calls and headers, we could perhaps work with compatibility version. E.g. making shmget and shmctl a real system call and converting the structures in sys_ipc to the old ones for old libraries? BTW I did some work to make the clean up the shm coding and make the limites sysctleable. It also avoids vmalloc for the page tables. The latter is really important for big servers. We run out of vm-space on some benchmarks. I appended the patch against 2.3.24. I could not finally test this patch since shm swapping has apparently a race condition on segment deletion introduced with the smp version. I am still investigating on that. But perhaps we could incorporate this patch anyways. It did survive stress testing shm-swapping as long as I do not remove segments. Greetings Christoph -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://humbolt.geo.uu.nl/Linux-MM/