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, Christos Zoulas wrote:

In article <Pine.NEB.4.64.1511050834200.7978%vps1.whooppee.com@localhost>,
Paul Goyette  <paul%whooppee.com@localhost> wrote:
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

This is called at pmap_bootstrap() so it is too late because
by the time you've loaded them module this code has ran.

Yes, that's why I wanted to make the increased allocation happen in
all cases, not just for the built-in case.

If you look in sysv_ipc.c the shminfo member shmall was 0.
pmap_bootstrap() is called via init_$MACHINE() from locore.S
just before main() is called. The shminit() code is called from
main.

So this code has been a no-op for a long time, just remove it.

Ah, kewl.  that makes life a lot simpler!  :)

We should also fix things so that we don't need to call the init
functions in init_main.c when they are built-in... All these ifdefs
need to go...

Yeah, that is on my list of things at which I need to look...  :)


+------------------+--------------------------+-------------------------+
| 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