From: Olivier MATZ <olivier.matz@6wind.com>
To: Zoltan Kiss <zoltan.kiss@linaro.org>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] mempool: improve cache search
Date: Fri, 03 Jul 2015 15:44:28 +0200 [thread overview]
Message-ID: <559691BC.8010609@6wind.com> (raw)
In-Reply-To: <55968ED8.2060904@6wind.com>
On 07/03/2015 03:32 PM, Olivier MATZ wrote:
>
>
> On 07/01/2015 11:03 AM, Zoltan Kiss wrote:
>> The current way has a few problems:
>>
>> - if cache->len < n, we copy our elements into the cache first, then
>> into obj_table, that's unnecessary
>> - if n >= cache_size (or the backfill fails), and we can't fulfil the
>> request from the ring alone, we don't try to combine with the cache
>> - if refill fails, we don't return anything, even if the ring has enough
>> for our request
>>
>> This patch rewrites it severely:
>> - at the first part of the function we only try the cache if cache->len < n
>> - otherwise take our elements straight from the ring
>> - if that fails but we have something in the cache, try to combine them
>> - the refill happens at the end, and its failure doesn't modify our return
>> value
>>
>> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
>
>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
>
Please ignore, sorry, I missed Konstantin's relevant comment.
prev parent reply other threads:[~2015-07-03 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 18:48 [dpdk-dev] [PATCH] mempool: improbe " Zoltan Kiss
2015-06-30 11:58 ` Olivier MATZ
2015-06-30 13:59 ` Zoltan Kiss
2015-07-01 9:03 ` [dpdk-dev] [PATCH v2] mempool: improve " Zoltan Kiss
2015-07-02 17:07 ` Ananyev, Konstantin
2015-07-07 17:17 ` Zoltan Kiss
2015-07-08 9:27 ` Bruce Richardson
2015-07-15 8:56 ` Olivier MATZ
2015-07-03 13:32 ` Olivier MATZ
2015-07-03 13:44 ` Olivier MATZ [this message]
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=559691BC.8010609@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=zoltan.kiss@linaro.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).