From: Mike Kravetz <mike.kravetz@oracle.com>
To: Michal Hocko <mhocko@kernel.org>, Waiman Long <longman@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Matthew Wilcox <willy@infradead.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Andi Kleen <ak@linux.intel.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: Re: [PATCH v2] mm/hugetlb: Defer freeing of huge pages if in non-task context
Date: Tue, 17 Dec 2019 10:33:01 -0800 [thread overview]
Message-ID: <e153119f-036c-7479-9f27-e8d043ee3d2f@oracle.com> (raw)
In-Reply-To: <20191217093143.GC31063@dhcp22.suse.cz>
On 12/17/19 1:31 AM, Michal Hocko wrote:
> On Mon 16-12-19 20:25:08, Waiman Long wrote:
> [...]
>> Both the hugetbl_lock and the subpool lock can be acquired in
>> free_huge_page(). One way to solve the problem is to make both locks
>> irq-safe.
>
> Please document why we do not take this, quite natural path and instead
> we have to come up with an elaborate way instead. I believe the primary
> motivation is that some operations under those locks are quite
> expensive. Please add that to the changelog and ideally to the code as
> well. We probably want to fix those anyway and then this would be a
> temporary workaround.
We may have talked in the past about how hugetlbfs locking is not ideal.
However, there are many things in hugetlbfs that are not ideal. :( The
thought was to avoid making changes unless they showed up as real problems.
Looks like the locking is now a real issue.
I'll start work on restructuring at least this part of the locking. But,
let's move forward with the deferred freeing approach until that is ready.
--
Mike Kravetz
prev parent reply other threads:[~2019-12-17 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 1:25 Waiman Long
2019-12-17 9:31 ` Michal Hocko
2019-12-17 10:50 ` Kirill Tkhai
2019-12-17 14:00 ` Waiman Long
2019-12-17 14:13 ` Kirill Tkhai
2019-12-17 14:27 ` Waiman Long
2019-12-17 14:06 ` Waiman Long
2019-12-17 14:59 ` Michal Hocko
2019-12-17 18:33 ` Mike Kravetz [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=e153119f-036c-7479-9f27-e8d043ee3d2f@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=willy@infradead.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