From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm/hugetlb: make hugetlb_lock irq safe
Date: Thu, 6 Sep 2018 09:24:17 +0530 [thread overview]
Message-ID: <19bb32a4-7acc-29ea-c00c-65cd2ebf9878@linux.ibm.com> (raw)
In-Reply-To: <20180905125846.eb0a9ed907b293c1b4c23c23@linux-foundation.org>
On 09/06/2018 01:28 AM, Andrew Morton wrote:
> On Wed, 5 Sep 2018 06:48:48 -0700 Matthew Wilcox <willy@infradead.org> wrote:
>
>>> I didn't. The reason I looked at current patch is to enable the usage of
>>> put_page() from irq context. We do allow that for non hugetlb pages. So was
>>> not sure adding that additional restriction for hugetlb
>>> is really needed. Further the conversion to irqsave/irqrestore was
>>> straightforward.
>>
>> straightforward, sure. but is it the right thing to do? do we want to
>> be able to put_page() a hugetlb page from hardirq context?
>
> Calling put_page() against a huge page from hardirq seems like the
> right thing to do - even if it's rare now, it will presumably become
> more common as the hugepage virus spreads further across the kernel.
> And the present asymmetry is quite a wart.
>
> That being said, arch/powerpc/mm/mmu_context_iommu.c:mm_iommu_free() is
> the only known site which does this (yes?) so perhaps we could put some
> stopgap workaround into that site and add a runtime warning into the
> put_page() code somewhere to detect puttage of huge pages from hardirq
> and softirq contexts.
>
> And attention will need to be paid to -stable backporting. How long
> has mm_iommu_free() existed, and been doing this?
>
That is old code that goes back to v4.2 (
15b244a88e1b2895605be4300b40b575345bcf50)
-aneesh
next prev parent reply other threads:[~2018-09-06 3:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 11:23 [RFC PATCH] mm/hugetlb: make hugetlb_lock irq safe Aneesh Kumar K.V
2018-09-05 13:04 ` Matthew Wilcox
2018-09-05 13:26 ` Aneesh Kumar K.V
2018-09-05 13:48 ` Matthew Wilcox
2018-09-05 19:58 ` Andrew Morton
2018-09-05 21:35 ` Mike Kravetz
2018-09-05 22:00 ` Andrew Morton
2018-09-05 23:07 ` Matthew Wilcox
2018-09-05 23:51 ` Mike Kravetz
2018-09-06 4:03 ` Aneesh Kumar K.V
2018-09-06 11:19 ` Michal Hocko
2018-09-06 3:58 ` Aneesh Kumar K.V
2018-09-06 3:54 ` Aneesh Kumar K.V [this message]
2018-09-06 4:00 ` Aneesh Kumar K.V
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=19bb32a4-7acc-29ea-c00c-65cd2ebf9878@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).