linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Hildenbrand <david@redhat.com>,
	Michal Privoznik <mprivozn@redhat.com>,
	Mina Almasry <almasrymina@google.com>,
	linux-kernel@vger.kernel.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 19:30:23 +0200	[thread overview]
Message-ID: <FF106FE1-E3DD-4A9B-B844-B04D0C26C403@redhat.com> (raw)
In-Reply-To: <be1e53c3-262c-e6f5-d68b-ab41c40d11ac@oracle.com>


> Am 21.10.2020 um 18:58 schrieb Mike Kravetz <mike.kravetz@oracle.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 was not able to reproduce, so I guess we found all issues!

Thanks!

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


      reply	other threads:[~2020-10-21 17:30 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
2020-10-21 17:30                       ` David Hildenbrand [this message]

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=FF106FE1-E3DD-4A9B-B844-B04D0C26C403@redhat.com \
    --to=david@redhat.com \
    --cc=almasrymina@google.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@oracle.com \
    --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).