From: Ric Mason <ric.masonn@gmail.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Minchan Kim <minchan@kernel.org>, Hugh Dickins <hughd@google.com>,
Nitin Gupta <ngupta@vflare.org>,
Seth Jennings <sjenning@linux.vnet.ibm.com>,
Konrad Rzeszutek Wilk <konrad@darnok.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Questin about swap_slot free and invalidate page
Date: Fri, 22 Feb 2013 11:13:23 +0800 [thread overview]
Message-ID: <5126E253.2030105@gmail.com> (raw)
In-Reply-To: <7793705b-a076-4c5a-be4d-9572d7560860@default>
On 02/22/2013 05:42 AM, Dan Magenheimer wrote:
>> From: Ric Mason [mailto:ric.masonn@gmail.com]
>> Subject: Re: Questin about swap_slot free and invalidate page
>>
>> On 02/19/2013 11:27 PM, Dan Magenheimer wrote:
>>>> From: Ric Mason [mailto:ric.masonn@gmail.com]
>>>>> Hugh is right that handling the possibility of duplicates is
>>>>> part of the tmem ABI. If there is any possibility of duplicates,
>>>>> the ABI defines how a backend must handle them to avoid data
>>>>> coherency issues.
>>>>>
>>>>> The kernel implements an in-kernel API which implements the tmem
>>>>> ABI. If the frontend and backend can always agree that duplicate
>>>> Which ABI in zcache implement that?
>>> https://oss.oracle.com/projects/tmem/dist/documentation/api/tmemspec-v001.pdf
>>>
>>> The in-kernel APIs are frontswap and cleancache. For more information about
>>> tmem, see http://lwn.net/Articles/454795/
>> But you mentioned that you have in-kernel API which can handle
>> duplicate. Do you mean zcache_cleancache/frontswap_put_page? I think
>> they just overwrite instead of optional flush the page on the
>> second(duplicate) put as mentioned in your tmemspec.
> Maybe I am misunderstanding your question... The spec allows
> overwrite (and return success) OR flush the page (and return
> failure). Zcache does the latter (flush). The code that implements
> it is in tmem_put.
Thanks for your point out. Pers pages can have duplicate put since swap
cache page can be reused. Can eph pages also have duplicate put? If yes,
when can happen?
>
--
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: Ric Mason <ric.masonn@gmail.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Minchan Kim <minchan@kernel.org>, Hugh Dickins <hughd@google.com>,
Nitin Gupta <ngupta@vflare.org>,
Seth Jennings <sjenning@linux.vnet.ibm.com>,
Konrad Rzeszutek Wilk <konrad@darnok.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Questin about swap_slot free and invalidate page
Date: Fri, 22 Feb 2013 11:13:23 +0800 [thread overview]
Message-ID: <5126E253.2030105@gmail.com> (raw)
In-Reply-To: <7793705b-a076-4c5a-be4d-9572d7560860@default>
On 02/22/2013 05:42 AM, Dan Magenheimer wrote:
>> From: Ric Mason [mailto:ric.masonn@gmail.com]
>> Subject: Re: Questin about swap_slot free and invalidate page
>>
>> On 02/19/2013 11:27 PM, Dan Magenheimer wrote:
>>>> From: Ric Mason [mailto:ric.masonn@gmail.com]
>>>>> Hugh is right that handling the possibility of duplicates is
>>>>> part of the tmem ABI. If there is any possibility of duplicates,
>>>>> the ABI defines how a backend must handle them to avoid data
>>>>> coherency issues.
>>>>>
>>>>> The kernel implements an in-kernel API which implements the tmem
>>>>> ABI. If the frontend and backend can always agree that duplicate
>>>> Which ABI in zcache implement that?
>>> https://oss.oracle.com/projects/tmem/dist/documentation/api/tmemspec-v001.pdf
>>>
>>> The in-kernel APIs are frontswap and cleancache. For more information about
>>> tmem, see http://lwn.net/Articles/454795/
>> But you mentioned that you have in-kernel API which can handle
>> duplicate. Do you mean zcache_cleancache/frontswap_put_page? I think
>> they just overwrite instead of optional flush the page on the
>> second(duplicate) put as mentioned in your tmemspec.
> Maybe I am misunderstanding your question... The spec allows
> overwrite (and return success) OR flush the page (and return
> failure). Zcache does the latter (flush). The code that implements
> it is in tmem_put.
Thanks for your point out. Pers pages can have duplicate put since swap
cache page can be reused. Can eph pages also have duplicate put? If yes,
when can happen?
>
next prev parent reply other threads:[~2013-02-22 3:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 5:11 Questin about swap_slot free and invalidate page Minchan Kim
2013-01-31 5:11 ` Minchan Kim
2013-02-04 1:51 ` Hugh Dickins
2013-02-04 1:51 ` Hugh Dickins
2013-02-04 2:49 ` Minchan Kim
2013-02-04 2:49 ` Minchan Kim
2013-02-04 21:28 ` Dan Magenheimer
2013-02-04 21:28 ` Dan Magenheimer
2013-02-05 1:24 ` Minchan Kim
2013-02-05 1:24 ` Minchan Kim
2013-02-19 12:12 ` Ric Mason
2013-02-19 12:12 ` Ric Mason
2013-02-19 15:27 ` Dan Magenheimer
2013-02-19 15:27 ` Dan Magenheimer
2013-02-20 2:03 ` Ric Mason
2013-02-20 2:03 ` Ric Mason
2013-02-21 21:42 ` Dan Magenheimer
2013-02-21 21:42 ` Dan Magenheimer
2013-02-22 3:13 ` Ric Mason [this message]
2013-02-22 3:13 ` Ric Mason
2013-02-25 17:20 ` Dan Magenheimer
2013-02-25 17:20 ` Dan Magenheimer
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=5126E253.2030105@gmail.com \
--to=ric.masonn@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dan.magenheimer@oracle.com \
--cc=hughd@google.com \
--cc=konrad@darnok.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sjenning@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 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.