Re: [PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-23 Thread Dan Streetman
On Fri, Nov 22, 2013 at 9:23 PM, Weijie Yang wrote: > Hello Dan, > > On Sat, Nov 23, 2013 at 6:10 AM, Dan Streetman wrote: >> Currently, zswap_entry_put removes the entry from its tree if >> the resulting refcount is 0. Several places in code put an >> entry's initial reference, but they also

Re: [PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-23 Thread Dan Streetman
On Fri, Nov 22, 2013 at 9:23 PM, Weijie Yang weijie.yang...@gmail.com wrote: Hello Dan, On Sat, Nov 23, 2013 at 6:10 AM, Dan Streetman ddstr...@ieee.org wrote: Currently, zswap_entry_put removes the entry from its tree if the resulting refcount is 0. Several places in code put an entry's

Re: [PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-22 Thread Weijie Yang
Hello Dan, On Sat, Nov 23, 2013 at 6:10 AM, Dan Streetman wrote: > Currently, zswap_entry_put removes the entry from its tree if > the resulting refcount is 0. Several places in code put an > entry's initial reference, but they also must remove the entry > from its tree first, which makes the

[PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-22 Thread Dan Streetman
Currently, zswap_entry_put removes the entry from its tree if the resulting refcount is 0. Several places in code put an entry's initial reference, but they also must remove the entry from its tree first, which makes the tree removal in zswap_entry_put redundant. I believe this has the refcount

[PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-22 Thread Dan Streetman
Currently, zswap_entry_put removes the entry from its tree if the resulting refcount is 0. Several places in code put an entry's initial reference, but they also must remove the entry from its tree first, which makes the tree removal in zswap_entry_put redundant. I believe this has the refcount

Re: [PATCH] mm/zswap: reverse zswap_entry tree/refcount relationship

2013-11-22 Thread Weijie Yang
Hello Dan, On Sat, Nov 23, 2013 at 6:10 AM, Dan Streetman ddstr...@ieee.org wrote: Currently, zswap_entry_put removes the entry from its tree if the resulting refcount is 0. Several places in code put an entry's initial reference, but they also must remove the entry from its tree first,