All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Weijie Yang <weijie.yang@samsung.com>
Cc: akpm@linux-foundation.org, sjennings@variantweb.net,
	bob.liu@oracle.com, weijie.yang.kh@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines
Date: Fri, 25 Oct 2013 19:20:32 +0900	[thread overview]
Message-ID: <20131025102032.GE6612@gmail.com> (raw)
In-Reply-To: <000101ced09e$fed90a10$fc8b1e30$%yang@samsung.com>

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() to hide resource free function.
> 
> - add a new function zswap_entry_find_get(), so that callers can use easily
> in the following pattern:
> 
>    zswap_entry_find_get
>    .../* do something */
>    zswap_entry_put
> 
> - to eliminate compile error, move some functions declaration
> 
> This patch is based on Minchan Kim <minchan@kernel.org> 's idea and suggestion.
> 
> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
> Cc: Seth Jennings <sjennings@variantweb.net>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Bob Liu <bob.liu@oracle.com>


I remember Bob had a idea to remove a look up and I think it's doable.
Anyway, I don't mind you send it with fix or not.

Thanks for handling this, Weijie!

Acked-by: Minchan Kim <minchan@kernel.org>

-- 
Kind regards,
Minchan Kim

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Weijie Yang <weijie.yang@samsung.com>
Cc: akpm@linux-foundation.org, sjennings@variantweb.net,
	bob.liu@oracle.com, weijie.yang.kh@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines
Date: Fri, 25 Oct 2013 19:20:32 +0900	[thread overview]
Message-ID: <20131025102032.GE6612@gmail.com> (raw)
In-Reply-To: <000101ced09e$fed90a10$fc8b1e30$%yang@samsung.com>

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() to hide resource free function.
> 
> - add a new function zswap_entry_find_get(), so that callers can use easily
> in the following pattern:
> 
>    zswap_entry_find_get
>    .../* do something */
>    zswap_entry_put
> 
> - to eliminate compile error, move some functions declaration
> 
> This patch is based on Minchan Kim <minchan@kernel.org> 's idea and suggestion.
> 
> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
> Cc: Seth Jennings <sjennings@variantweb.net>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Bob Liu <bob.liu@oracle.com>


I remember Bob had a idea to remove a look up and I think it's doable.
Anyway, I don't mind you send it with fix or not.

Thanks for handling this, Weijie!

Acked-by: Minchan Kim <minchan@kernel.org>

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2013-10-25 10:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24  9:53 [PATCH RESEND 2/2] mm/zswap: refoctor the get/put routines Weijie Yang
2013-10-24  9:53 ` Weijie Yang
2013-10-25 10:20 ` Minchan Kim [this message]
2013-10-25 10:20   ` Minchan Kim
2013-10-26  9:46   ` Weijie Yang
2013-10-26  9:46     ` Weijie Yang

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=20131025102032.GE6612@gmail.com \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bob.liu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sjennings@variantweb.net \
    --cc=stable@vger.kernel.org \
    --cc=weijie.yang.kh@gmail.com \
    --cc=weijie.yang@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.