linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: David Hildenbrand <david@redhat.com>,
	Michal Privoznik <mprivozn@redhat.com>,
	Mina Almasry <almasrymina@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Michal Hocko <mhocko@kernel.org>,
	Muchun Song <songmuchun@bytedance.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Tejun Heo <tj@kernel.org>
Subject: Re: cgroup and FALLOC_FL_PUNCH_HOLE: WARNING: CPU: 13 PID: 2438 at mm/page_counter.c:57 page_counter_uncharge+0x4b/0x5
Date: Wed, 21 Oct 2020 09:58:25 -0700	[thread overview]
Message-ID: <be1e53c3-262c-e6f5-d68b-ab41c40d11ac@oracle.com> (raw)
In-Reply-To: <bcbe71c9-f6a4-be19-329c-2fb0b675ae89@redhat.com>

> On 21.10.20 15:11, David Hildenbrand wrote:
>> On 21.10.20 14:57, Michal Privoznik wrote:
>>> On 10/21/20 5:35 AM, Mike Kravetz wrote:
>>>> On 10/20/20 6:38 AM, David Hildenbrand wrote:
>>>>
>>>> It would be good if Mina (at least) would look these over.  Would also
>>>> be interesting to know if these fixes address the bug seen with the qemu
>>>> use case.
>>>>
>>>> I'm still doing more testing and code inspection to look for other issues.
>>>>
...
...
>>>
>>> I've applied, rebuilt and tested, but unfortunately I still hit the problem:
>>> [ 6472.719047] ------------[ cut here ]------------
>>> [ 6472.719052] WARNING: CPU: 6 PID: 11773 at mm/page_counter.c:57 
...
...
>>
>> Agreed, same over here. :(
>>
> 
> I *think* the following on top makes it fly
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 67fc6383995b..5cf7f6a6c1a6 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -656,6 +656,9 @@ static long region_del(struct resv_map *resv, long
> f, long t)
> 
>                         del += t - f;
> 
> +                       hugetlb_cgroup_uncharge_file_region(
> +                               resv, rg, t - f);
> +
>                         /* New entry for end of split region */
>                         nrg->from = t;
>                         nrg->to = rg->to;
> @@ -667,9 +670,6 @@ static long region_del(struct resv_map *resv, long
> f, long t)
>                         /* Original entry is trimmed */
>                         rg->to = f;
> 
> -                       hugetlb_cgroup_uncharge_file_region(
> -                               resv, rg, nrg->to - nrg->from);
> -
>                         list_add(&nrg->link, &rg->link);
>                         nrg = NULL;
>                         break;
> 
> 

Thanks, yes that certainly does look like a bug in that code.

Does that resolve the issue with quemu?

I want to do a little more testing/research before sending a patch later
today.
-- 
Mike Kravetz

  parent reply	other threads:[~2020-10-21 16:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 15:22 cgroup and FALLOC_FL_PUNCH_HOLE: WARNING: CPU: 13 PID: 2438 at mm/page_counter.c:57 page_counter_uncharge+0x4b/0x5 David Hildenbrand
2020-10-14 16:15 ` David Hildenbrand
2020-10-14 17:56   ` Mina Almasry
2020-10-14 18:18     ` David Hildenbrand
2020-10-14 18:31       ` Mike Kravetz
2020-10-15  7:56         ` David Hildenbrand
2020-10-15  8:57           ` David Hildenbrand
2020-10-15  9:01             ` David Hildenbrand
2020-10-15 23:14         ` Mike Kravetz
2020-10-20 13:38           ` David Hildenbrand
2020-10-21  3:35             ` Mike Kravetz
2020-10-21 12:42               ` David Hildenbrand
2020-10-21 12:57               ` Michal Privoznik
2020-10-21 13:11                 ` David Hildenbrand
2020-10-21 13:34                   ` David Hildenbrand
2020-10-21 13:38                     ` David Hildenbrand
2020-10-21 16:58                     ` Mike Kravetz [this message]
2020-10-21 17:30                       ` David Hildenbrand

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=be1e53c3-262c-e6f5-d68b-ab41c40d11ac@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=almasrymina@google.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mprivozn@redhat.com \
    --cc=mst@redhat.com \
    --cc=songmuchun@bytedance.com \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).