From: "Radosław Smogura" <mail@smogura.eu>
To: linux-mm@kvack.org
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Hugh Dickins <hughd@google.com>,
Yongqiang Yang <xiaoqiangnk@gmail.com>
Subject: Re: [PATCH] mm: Change of refcounting method for compound page.
Date: Fri, 03 Feb 2012 20:05:27 +0100 [thread overview]
Message-ID: <1383050.EiyE3vO7UJ@localhost> (raw)
In-Reply-To: <1328290093-19294-2-git-send-email-mail@smogura.eu>
Dnia piątek, 3 lutego 2012 o 18:28:13 Radosław Smogura napisał(a):
> Compound pages are now refcounted in way allowing tracking of tail pages
> and automatically free of compound page when all references (counter)
> fell to zero. This in addition make get_page and get_page_unless_zero
> similar in work, as well put_page and put_page_unless_zero. In addition
> it makes procedures more friendly. One thing that should be taken, by
> developer, on account is to take care when page is putted or geted when
> compound lock is obtained, to avoid deadlocks. Locking is used to
> prevent concurrent compound split and only when page refcount goes from
> 0 to 1 or vice versa.
>
> Technically implementation uses 3rd element of compound page to store
> "tails usage counter". This counter is decremented when tail pages count
> goes to zero, and bumped when tail page is getted from zero usage
> (recovered) – this is to keep backward compatible usage of tail pages.
> If "tails usage counter" fell to zero head counter is decremented, if
> "tails usage counter" is increased to one the head count is increased,
> too. For compound pages without 3rd element (order of 1, two pages) 2nd
> page count is used in similar way as for higher order pages.
>
> Signed-off-by: Radosław Smogura <mail@smogura.eu>
> ---
> include/linux/mm.h | 94 ++++++++++++-----
> include/linux/mm_types.h | 24 ++++-
> include/linux/pagemap.h | 1 -
> mm/huge_memory.c | 25 +----
> mm/internal.h | 46 ---------
> mm/memory.c | 2 +-
> mm/page_alloc.c | 2 +
> mm/swap.c | 254
> +++++++++++++++++++++++++++++----------------- 8 files changed, 256
> insertions(+), 192 deletions(-)
<snip>
I would like to say huge sorry, I sent wrong patch (yesterday work). Please
discard previous patch, and consider patch I will send in reply to this email.
Not included change was introduced to allow proper concurrent work of get/put
page and split page .
Regards,
Radosław Smogura
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-02-03 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 17:28 [PATCH] mm: Change of refcounting method for compound page Radosław Smogura
2012-02-03 17:28 ` Radosław Smogura
2012-02-03 19:05 ` Radosław Smogura [this message]
2012-02-03 19:14 ` Radosław Smogura
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=1383050.EiyE3vO7UJ@localhost \
--to=mail@smogura.eu \
--cc=aarcange@redhat.com \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=xiaoqiangnk@gmail.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.