Hi,

I just looked at your branch and:

1) the first patch there that adds the -T option contains just part of the
functionality. Most of it is (incorrectly) placed in the next patch that
adds the new engine

- cpu.h use err.h which I don't think is available on all systems (at least
some of my old builders didn't have it)
- cpu.h use code that doesn't work on one of my builders (solaris):
daemon/cpu.h: In function ‘bind_thread_to_cpu’:
daemon/cpu.h:109:5: error: unknown type name ‘cpu_set_t’
daemon/cpu.h:110:5: error: implicit declaration of function ‘CPU_ZERO’
[-Werror=implicit-function-declaration]
daemon/cpu.h:111:5: error: implicit declaration of function ‘CPU_SET’
[-Werror=implicit-function-declaration]
daemon/cpu.h:112:5: error: implicit declaration of function
‘sched_setaffinity’ [-Werror=implicit-function-declaration]
daemon/cpu.h:112:37: error: ‘cpu_set_t’ undeclared (first use in this
function)

I think your configure script should check for the methods you support and
just print a warning if you don't know how it's implemented (instead of
falling back to a linux way). For solaris you should look at
pset_create/pset_bind etc.

2) The next patch contains a number of other problems:

- The code is pinned to linux with:
"engines/bag_lru_engine/items_bl.c", line 19: cannot find include file:
<linux/unistd.h>

(If I remove the linux/ part it builds on my boxes, how does linux/unistd.h
differ from unistd.h?)

- The code assumes you're using the gcc compiler (given the
"engines/bag_lru_engine/items_bl.c", line 81: error: implicit function
declaration: __sync_bool_compare_and_swap
"engines/bag_lru_engine/items_bl.c", line 750: error: implicit function
declaration: __sync_add_and_fetch
"engines/bag_lru_engine/items_bl.c", line 2078: error: implicit function
declaration: __sync_sub_and_fetch
"engines/bag_lru_engine/items_bl.c", line 2125: error: statement not reached

I didn't look too closely at the code, but it seems to be "a lot" of code
that is commented out.. that should be cleaned up.

Cheers,

Trond


On Tue, Jul 3, 2012 at 7:01 AM, rajiv <[email protected]> wrote:

> I just realised that there was a typo in the -E option in my original
> post.  It should read :
>
> “-E path_to_memcached_root**/.libs/bag_lru_engine.so”
>
> Say you installed the memcached source tree at say /home/memcached.  After
> you complete the build, a bunch of memcached related shared objects will
> get placed in /home/memcached.libs
>
> Among those shared objects will be the ones specific to the "engines".  By
> default the standard 1.6 memcahed tree includes one engine called
> "default_engine" whose correponding shared object is
> /home/memcached/.libs/default_engine.so.  The bagLRU branch has an
> additional eninge called "bag_lru_engine" whose implementation is in
> /home/memcached/.libs/bag_lru_engine.so .  If you do not use the "-E"
> option to memcached it uses the default_engine.  In order to use the bag
> LRU optimizations you need to use “-E /home/memcached
> /.libs/bag_lru_engine.so" option when launching memcached.
>
> Hope that clears it up.
>
> thanks,
> \rajiv
>
>
> On Monday, July 2, 2012 4:59:49 PM UTC-7, p4 guru wrote:
>
>> Hi rajiv
>>
>> Could you elaborate on how to use Bag LRU, not sure what you mean by use
>> -E path to memcached root wherever bag_lru_engine.so is ?
>>
>> thanks
>>
>> On Saturday, June 30, 2012 4:00:00 AM UTC+10, rajiv wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> To use the Bag LRU engine use the “-E path_to_memcached_root/engines**
>>> /.libs/bag_lru_engine.so” option to Memcached
>>>
>>>
>>
>>> Thanks,
>>>
>>> \rajiv
>>> Intel, Corp.
>>
>>


-- 
Trond Norbye

Reply via email to