Thanks, Henrik pal!
Thanks for your suggestions. It is very useful.
Such are the codes taken from store_repl_heap.c: createRemovalPolicy_heap
////////////////////////////////////////////////////////////////////////
if (!strcmp(keytype, "GDSF"))
heap_data->keyfunc = HeapKeyGen_StoreEntry_GDSF;
else if (!strcmp(keytype, "LFUDA"))
heap_data->keyfunc = HeapKeyGen_StoreEntry_LFUDA;
else if (!strcmp(keytype, "LRU"))
heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
else {
debug(81, 0) ("createRemovalPolicy_heap: Unknown key type \"%s\". Using LRU\n",
keytype);
heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
}
///////////////////////////////////////////////////////////////////////////
If I have developed a algorithm called George_LRU, :-), where should I add the "keytype"?
( like GSDF, LRU, LFUDA, here I want to add George_LRU).
Best regards,
George, Ma
----- 原文 -----
From: Henrik Nordstrom
To: maer727@sohu.com ;squid-dev@squid-cache.org
Cc: squid-dev@squid-cache.org
Subject: Re: Meeting trouble when modifying LRU algorithm.
Sent: Tue Apr 09 23:00:00 CST 2002
> maer727@sohu.com wrote:
>
> > 1. Edit file store_heap_replacement, modify the function
> > HeapKeyGen_StoreEntry_LRU
>
> I'd recommend you to add your own. See the store_repl_heap.c:
> createRemovalPolicy_heap for the list of key functions.. This way you can
> still call the "standard" heap based LRU for comparison.
>
> > 2. ./configure
> > make all
> > make install
> > (It takes a lot of time. Is there some method to make it quicker?)
> >
> > Is that right?
>
> If you have only changed the C source then it is sufficient to skip directly
> to "make install" the second time.
>
> Regards
> Henrik
Received on Tue Apr 09 2002 - 21:06:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:00 MST