From: "Alex Bennée" <alex.bennee@linaro.org>
To: Mahmoud Mandour <ma.mandourr@gmail.com>
Cc: cota@braap.org, qemu-devel@nongnu.org
Subject: Re: [RFC PATCH v3 0/4] Cache TCG plugin & symbol-resolution API
Date: Tue, 22 Jun 2021 15:57:35 +0100 [thread overview]
Message-ID: <87pmwerlnb.fsf@linaro.org> (raw)
In-Reply-To: <20210608040532.56449-1-ma.mandourr@gmail.com>
Mahmoud Mandour <ma.mandourr@gmail.com> writes:
> This RFC series introduces a new cache TCG plugin that models separate
> L1 data cache and L1 instruction cache and uses one shared cache for
> all the cores.
>
> It also includes a commit by Alex that adds an API call that resolves
> the symbol of an insn.
>
> The original RFC patch posted by Alex Bennée included incorporating
> symbol resolution into the cache plugin that caused conflicts, so I
> dropped the plugin additions from that and introduced them afterwards.
Queued patches 1-2 to plugins/next, will queue the rest from next
revision. Could you please also add a section to
docs/devel/tcg-plugins.rst to detail the argument options.
>
> v2 -> v3:
> Precomputed the value of block size shift once and stored in the
> cache.
>
> Removed tag shifting since it's okay to leave the tag in the
> high-order bits and mask out set index and block offset.
>
> Used one hashtable to store InsnData structs and made the structs
> have separate counters for data misses and instruction misses.
>
> Used a boolean to indicate whether an access resulted in a hit or a
> miss.
>
> Inserted an InsnData struct into the hashtable on translation-time
> and made sure we do so once so that we don't rewrite the struct if
> an instruction is translated multiple times.
>
> Made the output format for most-missing instructions more
> machine-readable.
>
> Removed trace-generation.
>
> Freed tokenized strings after argument parsing.
>
> Returned null from cache_init() if argument cache config is bad.
>
> Used one enum to indicate the chosen eviction policy.
>
> Added function pointers for cache update and metadata initialization
> and destroying. Those pointers are assigned to policy-specific
> functions.
>
> Remade LRU. Assigned a generation number that is incremented on each
> set access to the currently-accessed block's priority. On miss,
> evicted the block with the least generation number.
>
> Allowed to give multiple "evict" arguments and sticked to the last
> one.
>
> Alex Bennée (1):
> plugins/api: expose symbol lookup to plugins
>
> Mahmoud Mandour (3):
> plugins: Added a new cache modelling plugin.
> plugins/cache: Enabled cache parameterization
> plugins/cache: Added FIFO and LRU eviction policies.
>
> contrib/plugins/Makefile | 1 +
> contrib/plugins/cache.c | 642 +++++++++++++++++++++++++++++++++++++
> include/qemu/qemu-plugin.h | 9 +
> plugins/api.c | 6 +
> 4 files changed, 658 insertions(+)
> create mode 100644 contrib/plugins/cache.c
--
Alex Bennée
prev parent reply other threads:[~2021-06-22 14:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 4:05 [RFC PATCH v3 0/4] Cache TCG plugin & symbol-resolution API Mahmoud Mandour
2021-06-08 4:05 ` [RFC PATCH v3 1/4] plugins/api: expose symbol lookup to plugins Mahmoud Mandour
2021-06-08 4:05 ` [RFC PATCH v3 2/4] plugins: Added a new cache modelling plugin Mahmoud Mandour
2021-06-08 4:05 ` [RFC PATCH v3 3/4] plugins/cache: Enabled cache parameterization Mahmoud Mandour
2021-06-22 14:37 ` Alex Bennée
2021-06-08 4:05 ` [RFC PATCH v3 4/4] plugins/cache: Added FIFO and LRU eviction policies Mahmoud Mandour
2021-06-22 14:57 ` Alex Bennée
2021-06-22 14:57 ` Alex Bennée [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=87pmwerlnb.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=ma.mandourr@gmail.com \
--cc=qemu-devel@nongnu.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).