[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54fdf347-e12e-0d3e-6c33-8b1b7898876c@oracle.com>
Date: Mon, 16 Aug 2021 17:58:31 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Michal Hocko <mhocko@...e.com>,
Oscar Salvador <osalvador@...e.de>, Zi Yan <ziy@...dia.com>,
Muchun Song <songmuchun@...edance.com>,
Naoya Horiguchi <naoya.horiguchi@...ux.dev>,
David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH RESEND 0/8] hugetlb: add demote/split page functionality
On 8/16/21 5:39 PM, Andrew Morton wrote:
> On Mon, 16 Aug 2021 17:17:50 -0700 Mike Kravetz <mike.kravetz@...cle.com> wrote:
>
>>>
>>> And how does one know the operation has completed so the sysfs files
>>> can be reloaded for another operation?
>>>
>>
>> When the write to the file is complete, the operation has completed.
>> Not exactly sure what you mean by reloading the sysfs files for
>> another operation?
>
> If userspace wishes to perform another demote operation, it must wait
> for the preceding one to complete.
>
> Presumably if thread A is blocked in a write to `demote' and thread B
> concurrently tries to perform a demotion, thread B will be blocked as
> well? Was this tested?
I must admit that I did not specifically test this. However, the
patch series to make freeing of hugetlb pages IRQ safe added a
(per-hstate)mutex that is taken when sysfs files modify the number of
huge pages. demote writes take this mutex (patch 1). That synchronizes
not only concurrent writes to demote but also concurrent modifications
of nr_hugepages.
>
> Lots of things are to be added to changelogs & documentation, methinks.
>
OK.
Thank you for taking a look at this!
--
Mike Kravetz
Powered by blists - more mailing lists