tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: arch/mips (and arch/alpha) pmap.c dependency on SYSVSHM



On Thu, 5 Nov 2015, Paul Goyette wrote:

Following up on my earlier modularization of the SYSV IPC code, I have
discovered that mips's pmap.c includes some SYSVSHM size in the calcs
for the system map sizes.  At line 516 in arch/mips/mips/pmap.c we have

#ifdef SYSVSHM
       Sysmapsize += shminfo.shmall;
#endif

In arch/alpha/alpha/pmap.c we have at line 781

#ifdef SYSVSHM
       lev3mapsize += shminfo.shmall;
#endif

We also have the following code in arch/powerpc/booke/booke_pmap.c at
line 199

#ifdef SYSVSHM
            + NBPG * shminfo.shmall
#endif


Since SYSVSHM could be loaded as a module, rather than being built-in
to the kernel, would it be reasonable to remove these #ifdef's and
thus always include the increment to the map sizes?

It seems that noone is currently using modular sysv_ipc on either mips
or alpha, since otherwize I would have expected some fallout from an
incorrect sizing of the system map.  Including the above code
unconditionally should not have a significant impact on kernel size
even for those kernels that don't include the SYSVSHM code.


I propose that all three of these "system size" decisions be made
unconditional, and assume the SYSVSHM either exists, or can exist
via loading of a module.


+------------------+--------------------------+-------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
+------------------+--------------------------+-------------------------+


Home | Main Index | Thread Index | Old Index