qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v6 1/3] cputlb: do not evict empty entries to the vtlb
Date: Wed, 16 Jan 2019 11:53:50 -0500	[thread overview]
Message-ID: <20190116165350.GA21932@flamenco> (raw)
In-Reply-To: <87fttszydz.fsf@linaro.org>

On Wed, Jan 16, 2019 at 10:32:08 +0000, Alex Bennée wrote:
> 
> Emilio G. Cota <cota@braap.org> writes:
> 
> > Currently we evict an entry to the victim TLB when it doesn't match
> > the current address. But it could be that there's no match because
> > the current entry is empty (i.e. all -1's, for instance via tlb_flush).
> > Do not evict the entry to the vtlb in that case.
> >
> > This change will help us keep track of the TLB's use rate, which
> > we'll use to implement a policy for dynamic TLB sizing.
> >
> > Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> > Signed-off-by: Emilio G. Cota <cota@braap.org>
> > ---
> >  include/exec/cpu-all.h | 9 +++++++++
> >  accel/tcg/cputlb.c     | 2 +-
> >  2 files changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> > index 117d2fbbca..e21140049b 100644
> > --- a/include/exec/cpu-all.h
> > +++ b/include/exec/cpu-all.h
> > @@ -362,6 +362,15 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr)
> >      return tlb_hit_page(tlb_addr, addr & TARGET_PAGE_MASK);
> >  }
> >
> > +/**
> > + * tlb_entry_is_empty - return true if the entry is not in use
> > + * @te: pointer to CPUTLBEntry
> > + */
> > +static inline bool tlb_entry_is_empty(const CPUTLBEntry *te)
> > +{
> > +    return te->addr_read == -1 && te->addr_write == -1 && te->addr_code == -1;
> > +}
> > +
> 
> This breaks on a --disable-tcg build. I think the whole block needs to
> be in a:
> 
>   #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
> 
> now.

Good catch, thanks! I'll send a v7 with this fixed.

Thanks,

		E.

  reply	other threads:[~2019-01-16 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 16:50 [Qemu-devel] [PATCH v6 0/3] Dynamic TLB sizing Emilio G. Cota
2019-01-14 16:50 ` [Qemu-devel] [PATCH v6 1/3] cputlb: do not evict empty entries to the vtlb Emilio G. Cota
2019-01-16 10:32   ` Alex Bennée
2019-01-16 16:53     ` Emilio G. Cota [this message]
2019-01-14 16:50 ` [Qemu-devel] [PATCH v6 2/3] tcg: introduce dynamic TLB sizing Emilio G. Cota
2019-01-14 19:34   ` Emilio G. Cota
2019-01-14 16:50 ` [Qemu-devel] [PATCH v6 3/3] tcg/i386: enable " Emilio G. Cota

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=20190116165350.GA21932@flamenco \
    --to=cota@braap.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@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).