From: Avi Kivity <avi@qumranet.com>
To: Izik Eidus <izike@qumranet.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
Marcelo Tosatti <marcelo@kvack.org>
Subject: Re: KVM: register the kvm mmu cache with the shrinker.
Date: Thu, 27 Mar 2008 14:45:16 +0200 [thread overview]
Message-ID: <47EB96DC.4020200@qumranet.com> (raw)
In-Reply-To: <47E8F82E.3000905@qumranet.com>
Izik Eidus wrote:
> void kvm_mmu_module_exit(void)
> {
> if (pte_chain_cache)
> @@ -1980,6 +2026,7 @@ void kvm_mmu_module_exit(void)
> kmem_cache_destroy(rmap_desc_cache);
> if (mmu_page_header_cache)
> kmem_cache_destroy(mmu_page_header_cache);
> + unregister_shrinker(&mmu_shrinker);
> }
>
kvm_mmu_module_exit() can be called from the nomem: label below, so the
shrinker will be unregistered despite not being registered.
Suggest renaming kvm_mmu_module_exit() to mmu_destroy_caches(), and
adding a new kvm_mmu_module_exit() which will call mmu_destroy_caches()
and unregister_shrinker().
>
> int kvm_mmu_module_init(void)
> @@ -2001,6 +2048,8 @@ int kvm_mmu_module_init(void)
> if (!mmu_page_header_cache)
> goto nomem;
>
> + register_shrinker(&mmu_shrinker);
> +
> return 0;
>
> nomem:
>
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2008-03-27 12:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 12:15 KVM: register the kvm mmu cache with the shrinker Izik Eidus
2008-03-25 12:36 ` Avi Kivity
2008-03-25 13:03 ` Izik Eidus
2008-03-27 12:45 ` Avi Kivity [this message]
2008-03-30 12:17 ` Izik Eidus
2008-03-30 13:30 ` Avi Kivity
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=47EB96DC.4020200@qumranet.com \
--to=avi@qumranet.com \
--cc=izike@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=marcelo@kvack.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