From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Konrad Wilk <konrad.wilk@oracle.com>,
Nitin Gupta <ngupta@vflare.org>
Subject: RE: [PATCH 02/10] zcache: fix refcount leak
Date: Wed, 20 Jun 2012 15:25:52 -0700 (PDT) [thread overview]
Message-ID: <db70ea46-7e43-4795-a399-c3220cda0a46@default> (raw)
In-Reply-To: <4FE14149.7030807@linux.vnet.ibm.com>
> From: Xiao Guangrong [mailto:xiaoguangrong@linux.vnet.ibm.com]
> Subject: Re: [PATCH 02/10] zcache: fix refcount leak
>
> On 06/20/2012 10:54 AM, Xiao Guangrong wrote:
>
> > On 06/20/2012 04:06 AM, Seth Jennings wrote:
> >
> >> On 06/19/2012 02:49 PM, Dan Magenheimer wrote:
> >>
> >>> My preference would be to fix it the opposite way, by
> >>> checking and ignoring zcache_host in zcache_put_pool.
> >>> The ref-counting is to ensure that a client isn't
> >>> accidentally destroyed while in use (for multiple-client
> >>> users such as ramster and kvm) and since zcache_host is a static
> >>> struct, it should never be deleted so need not be ref-counted.
> >>
> >>
> >> If we do that, we'll need to comment it. If we don't, it won't be
> >> obvious why we are refcounting every zcache client except one. It'll
> >> look like a bug.
> >
> >
> > Okay, i will fix it like Dan's way and comment it.
>
> Hmm...But i notice that zcache_host is the same as other clients, all
> of them are static struct:
>
> | static struct zcache_client zcache_host;
> | static struct zcache_client zcache_clients[MAX_CLIENTS];
>
> And all of them are not destroyed.
Yes, the code currently in zcache was a first step towards
supporting multiple clients. Ramster goes one step further
and kvm will require even a tiny bit more work.
FYI, I'm working on a unification version of zcache that can support
all of these cleanly as well as better support for eviction
that will make standalone zcache more suitable for promotion from
staging and enterprise-ready. Due to various summer commitments,
it will probably be a few weeks before it is ready for posting.
Dan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-06-20 22:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 8:32 [PATCH 01/10] zcache: fix preemptable memory allocation in atomic context Xiao Guangrong
2012-06-19 8:33 ` [PATCH 02/10] zcache: fix refcount leak Xiao Guangrong
2012-06-19 14:28 ` Seth Jennings
2012-06-19 19:49 ` Dan Magenheimer
2012-06-19 20:06 ` Seth Jennings
2012-06-20 2:54 ` Xiao Guangrong
2012-06-20 3:19 ` Xiao Guangrong
2012-06-20 22:25 ` Dan Magenheimer [this message]
2012-06-21 1:44 ` Xiao Guangrong
2012-06-19 8:33 ` [PATCH 03/10] zcache: fix a compile warning Xiao Guangrong
2012-06-19 14:30 ` Seth Jennings
2012-06-20 2:55 ` Xiao Guangrong
2012-06-19 8:34 ` [PATCH 04/10] zcache: remove unnecessary check of config option dependence Xiao Guangrong
2012-06-19 14:36 ` Seth Jennings
2012-06-19 8:35 ` [PATCH 05/10] zcache: mark zbud_init/zcache_comp_init as __init Xiao Guangrong
2012-06-19 16:35 ` Seth Jennings
2012-06-19 8:35 ` [PATCH 06/10] zcache: cleanup zbud_init Xiao Guangrong
2012-06-19 8:35 ` [PATCH 07/10] zcache: optimize zcache_do_preload Xiao Guangrong
2012-06-19 8:36 ` [PATCH 08/10] zcache: cleanup zcache_do_preload and zcache_put_page Xiao Guangrong
2012-06-19 8:37 ` [PATCH 09/10] zcache: introduce get_zcache_client Xiao Guangrong
2012-06-19 8:37 ` [PATCH 10/10] cleanup the code between tmem_obj_init and tmem_obj_find Xiao Guangrong
2012-06-19 16:49 ` Seth Jennings
2012-06-20 2:53 ` Xiao Guangrong
2012-06-19 14:26 ` [PATCH 01/10] zcache: fix preemptable memory allocation in atomic context Seth Jennings
2012-06-20 2:51 ` Xiao Guangrong
2012-06-21 18:51 ` Seth Jennings
2012-06-23 3:00 ` Greg Kroah-Hartman
2012-06-25 13:48 ` Seth Jennings
2012-06-25 14:11 ` Greg Kroah-Hartman
2012-06-26 7:08 ` Xiao Guangrong
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=db70ea46-7e43-4795-a399-c3220cda0a46@default \
--to=dan.magenheimer@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ngupta@vflare.org \
--cc=sjenning@linux.vnet.ibm.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
/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