Re: [PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines

2013-10-26 Thread Weijie Yang
On Fri, Oct 25, 2013 at 6:20 PM, Minchan Kim wrote: > On Thu, Oct 24, 2013 at 05:53:32PM +0800, Weijie Yang wrote: >> The refcount routine was not fit the kernel get/put semantic exactly, >> There were too many judgement statements on refcount and it could be minus. >> >> This patch does the follo

Re: [PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines

2013-10-25 Thread Minchan Kim
On Thu, Oct 24, 2013 at 05:53:32PM +0800, Weijie Yang wrote: > The refcount routine was not fit the kernel get/put semantic exactly, > There were too many judgement statements on refcount and it could be minus. > > This patch does the following: > > - move refcount judgement to zswap_entry_put()

[PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines

2013-10-24 Thread Weijie Yang
The refcount routine was not fit the kernel get/put semantic exactly, There were too many judgement statements on refcount and it could be minus. This patch does the following: - move refcount judgement to zswap_entry_put() to hide resource free function. - add a new function zswap_entry_find_ge