Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@freelists.org>,
	Alexander Turenko <alexander.turenko@tarantool.org>
Subject: Re: [RFC v2] slab_arena: Enhance slab_arena_create to support madvise hints
Date: Mon, 13 May 2019 14:56:43 +0300	[thread overview]
Message-ID: <20190513115643.26ysavw5a5izjruw@esperanza> (raw)
In-Reply-To: <20190513114131.GD2544@uranus.lan>

On Mon, May 13, 2019 at 02:41:31PM +0300, Cyrill Gorcunov wrote:
> On Mon, May 13, 2019 at 02:21:56PM +0300, Vladimir Davydov wrote:
> > On Mon, May 13, 2019 at 01:30:32PM +0300, Cyrill Gorcunov wrote:
> > > > > +check_symbol_exists(MADV_NORMAL sys/mman.h TARANTOOL_SMALL_HAS_MADV_NORMAL)
> > > > > +check_symbol_exists(MADV_DONTDUMP sys/mman.h TARANTOOL_SMALL_HAS_MADV_DONTDUMP)
> > > > 
> > > > Do we really need to check all of that? Is a check for MADV_DONTDUMP not
> > > > enough?
> > > 
> > > Well, strictly speaking we should check each definition we use, because I'm
> > > not sure if MADV_NORMAL defined on other than linux environments.
> > 
> > Why do we use MADV_NORMAL, anyway? We only need MADV_DONTDUMP or
> > am I missing something?
> 
> Because we need a default value, which would be different
> from MADV_DONTDUMP. Actually MADV_NORMAL = 0 in linux and

If SLAB_DONTDUMP isn't set, we don't need to call madvise at all, do we?

> I think we may even live without this member initialized

If we store SLAB_* flags in slab_arena instead of map_flags + madv_flags
we won't be facing this problem, will we?

> but for code readability sake I assign mode to MADV_NORMAL
> by default.

  reply	other threads:[~2019-05-13 11:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 17:43 Cyrill Gorcunov
2019-05-13 10:06 ` Vladimir Davydov
2019-05-13 10:30   ` Cyrill Gorcunov
2019-05-13 11:21     ` Vladimir Davydov
2019-05-13 11:41       ` Cyrill Gorcunov
2019-05-13 11:56         ` Vladimir Davydov [this message]
2019-05-13 12:02           ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190513115643.26ysavw5a5izjruw@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [RFC v2] slab_arena: Enhance slab_arena_create to support madvise hints' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox