From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: "Huang, Ying" <ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andrea Arcangeli
<aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Kirill A . Shutemov"
<kirill.shutemov-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Vladimir Davydov
<vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>,
Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge multiple swap entries
Date: Fri, 31 Mar 2017 10:59:06 -0400 [thread overview]
Message-ID: <20170331145906.GC6408@cmpxchg.org> (raw)
In-Reply-To: <87k277twip.fsf-5/hDr2MS57EDqwDYnZuMFFaTQe2KTcn/@public.gmane.org>
On Thu, Mar 30, 2017 at 08:53:50AM +0800, Huang, Ying wrote:
> Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> writes:
> > but there doesn't seem to be a reason to
> > pass @nr_entries when we have the struct page. Why can't this function
> > just check PageTransHuge() by itself?
>
> Because sometimes we need to charge one swap entry for a THP. Please
> take a look at the original add_to_swap() implementation. For a THP,
> one swap entry will be allocated and charged to the mem cgroup before
> the THP is split. And I think it is not easy to change this, because we
> don't want to split THP if the mem cgroup for swap exceeds its limit.
I think we do. Let's continue this discussion in the 9/9 subthread.
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrea Arcangeli <aarcange@redhat.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Vladimir Davydov <vdavydov@virtuozzo.com>,
Michal Hocko <mhocko@kernel.org>, Tejun Heo <tj@kernel.org>,
cgroups@vger.kernel.org
Subject: Re: [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge multiple swap entries
Date: Fri, 31 Mar 2017 10:59:06 -0400 [thread overview]
Message-ID: <20170331145906.GC6408@cmpxchg.org> (raw)
In-Reply-To: <87k277twip.fsf@yhuang-dev.intel.com>
On Thu, Mar 30, 2017 at 08:53:50AM +0800, Huang, Ying wrote:
> Johannes Weiner <hannes@cmpxchg.org> writes:
> > but there doesn't seem to be a reason to
> > pass @nr_entries when we have the struct page. Why can't this function
> > just check PageTransHuge() by itself?
>
> Because sometimes we need to charge one swap entry for a THP. Please
> take a look at the original add_to_swap() implementation. For a THP,
> one swap entry will be allocated and charged to the mem cgroup before
> the THP is split. And I think it is not easy to change this, because we
> don't want to split THP if the mem cgroup for swap exceeds its limit.
I think we do. Let's continue this discussion in the 9/9 subthread.
--
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: Johannes Weiner <hannes@cmpxchg.org>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrea Arcangeli <aarcange@redhat.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Vladimir Davydov <vdavydov@virtuozzo.com>,
Michal Hocko <mhocko@kernel.org>, Tejun Heo <tj@kernel.org>,
cgroups@vger.kernel.org
Subject: Re: [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge multiple swap entries
Date: Fri, 31 Mar 2017 10:59:06 -0400 [thread overview]
Message-ID: <20170331145906.GC6408@cmpxchg.org> (raw)
In-Reply-To: <87k277twip.fsf@yhuang-dev.intel.com>
On Thu, Mar 30, 2017 at 08:53:50AM +0800, Huang, Ying wrote:
> Johannes Weiner <hannes@cmpxchg.org> writes:
> > but there doesn't seem to be a reason to
> > pass @nr_entries when we have the struct page. Why can't this function
> > just check PageTransHuge() by itself?
>
> Because sometimes we need to charge one swap entry for a THP. Please
> take a look at the original add_to_swap() implementation. For a THP,
> one swap entry will be allocated and charged to the mem cgroup before
> the THP is split. And I think it is not easy to change this, because we
> don't want to split THP if the mem cgroup for swap exceeds its limit.
I think we do. Let's continue this discussion in the 9/9 subthread.
next prev parent reply other threads:[~2017-03-31 14:59 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 5:32 [PATCH -mm -v7 0/9] THP swap: Delay splitting THP during swapping out Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 1/9] mm, swap: Make swap cluster size same of THP size on x86_64 Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 23:30 ` Kirill A. Shutemov
2017-03-28 23:30 ` Kirill A. Shutemov
2017-03-29 1:10 ` Huang, Ying
2017-03-29 1:10 ` Huang, Ying
2017-03-29 16:55 ` Johannes Weiner
2017-03-29 16:55 ` Johannes Weiner
2017-03-30 0:45 ` Huang, Ying
2017-03-30 0:45 ` Huang, Ying
2017-03-31 14:56 ` Johannes Weiner
2017-03-31 14:56 ` Johannes Weiner
2017-04-01 3:29 ` Huang, Ying
2017-04-01 3:29 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge multiple swap entries Huang, Ying
2017-03-28 5:32 ` Huang, Ying
[not found] ` <20170328053209.25876-3-ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-29 16:57 ` Johannes Weiner
2017-03-29 16:57 ` Johannes Weiner
2017-03-29 16:57 ` Johannes Weiner
[not found] ` <20170329165722.GB31821-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2017-03-30 0:53 ` Huang, Ying
2017-03-30 0:53 ` Huang, Ying
2017-03-30 0:53 ` Huang, Ying
[not found] ` <87k277twip.fsf-5/hDr2MS57EDqwDYnZuMFFaTQe2KTcn/@public.gmane.org>
2017-03-31 14:59 ` Johannes Weiner [this message]
2017-03-31 14:59 ` Johannes Weiner
2017-03-31 14:59 ` Johannes Weiner
2017-03-28 5:32 ` [PATCH -mm -v7 3/9] mm, THP, swap: Add swap cluster allocate/free functions Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 4/9] mm, THP, swap: Add get_huge_swap_page() Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-29 17:08 ` Johannes Weiner
2017-03-29 17:08 ` Johannes Weiner
2017-03-30 4:28 ` Huang, Ying
2017-03-30 4:28 ` Huang, Ying
2017-03-31 15:24 ` Johannes Weiner
2017-03-31 15:24 ` Johannes Weiner
2017-04-01 3:32 ` Huang, Ying
2017-04-01 3:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 5/9] mm, THP, swap: Support to clear SWAP_HAS_CACHE for huge page Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 6/9] mm, THP, swap: Support to add/delete THP to/from swap cache Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 7/9] mm, THP: Add can_split_huge_page() Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 8/9] mm, THP, swap: Support to split THP in swap cache Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-28 5:32 ` [PATCH -mm -v7 9/9] mm, THP, swap: Delay splitting THP during swap out Huang, Ying
2017-03-28 5:32 ` Huang, Ying
2017-03-29 17:16 ` Johannes Weiner
2017-03-29 17:16 ` Johannes Weiner
2017-03-30 4:15 ` Huang, Ying
2017-03-30 4:15 ` Huang, Ying
2017-03-31 14:49 ` Johannes Weiner
2017-03-31 14:49 ` Johannes Weiner
2017-04-01 2:54 ` Huang, Ying
2017-04-01 2:54 ` Huang, Ying
2017-03-28 22:13 ` [PATCH -mm -v7 0/9] THP swap: Delay splitting THP during swapping out Andrew Morton
2017-03-28 22:13 ` Andrew Morton
2017-03-29 8:52 ` Huang, Ying
2017-03-29 8:52 ` Huang, Ying
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=20170331145906.GC6408@cmpxchg.org \
--to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
--cc=aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kirill.shutemov-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org \
--cc=ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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.