Re: 2Gb SYSVSHM limitation

From: Christian S.J. Peron <csjp_at_FreeBSD.org>
Date: Mon, 17 Jul 2006 12:29:22 -0500
John Baldwin wrote:
> On Wednesday 12 July 2006 04:58, Igor Sysoev wrote:
>   
>> Hi,
>>
>> the current kernel limit of SysV memory segment is 2G.
>> Today it is too small for amd64 machines.
>>
>> Year ago Christian S.J. Peron had propsed the patch
>> http://people.freebsd.org/~csjp/bigsharedmem.1117028863.diff
>> to increase the limit:
>> http://freebsd.rambler.ru/bsdmail/freebsd-current_2005/msg05627.html
>>
>> Are objections against this patch ?
>>     
>
> Well, it breaks the ABI of shminfo. :(  Changing the ABI of structures shared 
> with userspace like this requires duplicate syscalls, etc. to not break 
> existing binaries (such as existing 6.x amd64 binaries).
>
>   
I committed this patch, I just have not MFCed it. The ABI breakage is 
un-clear:

I change this structure which should be kernel private, and I dont think 
we make any guarantees here.

We do export this kernel private structure through shmctl(IPC_INFO), 
however IPC_INFO is not standard.

#ifdef _KERNEL

/*
 * System 5 style catch-all structure for shared memory constants that
 * might be of interest to user programs.  Do we really want/need this?
 */
struct shminfo {
        int     shmmax,         /* max shared memory segment size (bytes) */
                shmmin,         /* min shared memory segment size (bytes) */
                shmmni,         /* max number of shared memory 
identifiers */
                shmseg,         /* max shared memory segments per process */
                shmall;         /* max amount of shared memory (pages) */
};

I changed these from int to long iirc

-- 
Christian S.J. Peron
csjp_at_FreeBSD.ORG
FreeBSD Committer
FreeBSD Security Team
Received on Mon Jul 17 2006 - 15:29:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC