tech-kern archive

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

Re: Autotuning of kern.ipc.shmmaxpgs



On Mon, Mar 02, 2009 at 04:40:57PM +0000, Mindaugas Rasiukevicius wrote:
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> > -   shminfo.shmmax *= PAGE_SIZE;
> > +   if (shminfo.shmmax == 0) {
> > +           shminfo.shmmax = physmem / 4 * PAGE_SIZE;
> > +           if (shminfo.shmmax < 1024)
> > +                   shminfo.shmmax = 1024;
> > +   } else {
> > +           shminfo.shmmax *= PAGE_SIZE;
> > +   }
> > +   shminfo.shmall = shminfo.shmmax / PAGE_SIZE;
> 
> I would simplify this as:

I'll do something similar.

> Also, I think remove SHMMAX/SHMMAXPGS check completely, that is, no need
> to have if (shminfo.shmmax) case.

I'd like to keep the option for legacy compat for now.

Joerg


Home | Main Index | Thread Index | Old Index