Re: [RFC 02/20] timens: Add timens_offsets
From: Cyrill Gorcunov
Date: Thu Sep 20 2018 - 18:14:55 EST
On Thu, Sep 20, 2018 at 09:45:10PM +0300, Cyrill Gorcunov wrote:
> On Wed, Sep 19, 2018 at 09:50:19PM +0100, Dmitry Safonov wrote:
> > From: Andrei Vagin <avagin@xxxxxxxxxx>
> >
> > Introduce offsets for time namespace. They will contain adjustment
> > needed to convert clocks to/from host's.
> >
> > Allocate one page for each time namespace that will be premapped into
> > userspace with vvar pages.
>
> Is not it too much?! The whole page per each clone(new-time-ns) call.
> Moreover everytime it is get explicitly zeroifyed. Don't get me wrong,
> maybe I miss something obvious, but additional 4K per process, guys :)
After being talking to Andrew I think there is no better option though.
If syscalls would be free of course we could use them instead but this
vdso stuff, sigh. I thouhgh about modifying vdso code so it would carry
refs inside (or adding some section into elf loader kernel code), but
all this would simply mess the code. Thus this 4K per namespace seems
to be acceptable trade off.