From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Wed, 15 May 2019 16:22:16 +0300 From: Cyrill Gorcunov Subject: Re: [PATCH v3] slab_arena: Enhance slab_arena_create to support madvise hints Message-ID: <20190515132216.GE2952@uranus.lan> References: <20190513200126.7584-1-gorcunov@gmail.com> <20190515123756.6jmoyzm7kf7fahzp@esperanza> <20190515125304.GC2952@uranus.lan> <20190515130812.tvkrwnjclasvrbgn@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515130812.tvkrwnjclasvrbgn@esperanza> To: Vladimir Davydov Cc: tml , Alexander Turenko List-ID: On Wed, May 15, 2019 at 04:08:12PM +0300, Vladimir Davydov wrote: > > > > You know I thought if we could use small/conf.h inside tarantool. > > For this sake I prefixed symbols with TARANROOL_SMALL_ to not interfere > > with any other symbols. > > > > Another option -- provide something like > > > > static const uint64_t small_features = (bitset of features); > > I would define HAVE_MADV_DONTNEED in tarantool's config.h. This won't work: you may have tarantool compiled on machine where don't need not supported, but small compiled on a system where madv is present (note that I'm talking about system libs, the kernel may have own features enabled). Also I think the main idea of "small" as a library is to separate code as much as possible: tarantool should not do any own compile testing but rather request the library if particular feature is implemented (either via API or via config.h shipped with library). Lets talk f2f. > > It does compile on my box, which runs Linux. Note the cast: it should be > fine to explicitly cast (char *) to intptr_t. Weird, I'll retry.