lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 31 Mar 2017 10:59:06 -0400
From:   Johannes Weiner <hannes@...xchg.org>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Andrea Arcangeli <aarcange@...hat.com>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Vladimir Davydov <vdavydov@...tuozzo.com>,
        Michal Hocko <mhocko@...nel.org>, Tejun Heo <tj@...nel.org>,
        cgroups@...r.kernel.org
Subject: Re: [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge
 multiple swap entries

On Thu, Mar 30, 2017 at 08:53:50AM +0800, Huang, Ying wrote:
> Johannes Weiner <hannes@...xchg.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.

Powered by blists - more mailing lists