From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
Vlastimil Babka <vbabka@suse.cz>,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] mm/thp: Make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS
Date: Mon, 5 Jul 2021 08:57:54 +0530 [thread overview]
Message-ID: <45c1feaa-4bab-91d1-6962-81549d2b6d00@arm.com> (raw)
In-Reply-To: <YN27uc64s/yllfQR@casper.infradead.org>
On 7/1/21 6:27 PM, Matthew Wilcox wrote:
> On Thu, Jul 01, 2021 at 10:51:27AM +0530, Anshuman Khandual wrote:
>>
>>
>> On 5/20/21 4:47 PM, Matthew Wilcox wrote:
>>> On Wed, May 19, 2021 at 01:03:06PM +0530, Anshuman Khandual wrote:
>>>> Split ptlocks need not be defined and allocated unless they are being used.
>>>> ALLOC_SPLIT_PTLOCKS is inherently dependent on USE_SPLIT_PTE_PTLOCKS. This
>>>> just makes it explicit and clear. While here drop the spinlock_t element
>>>> from the struct page when USE_SPLIT_PTE_PTLOCKS is not enabled.
>>>
>>> I didn't spot this email yesterday. I'm not a fan. Isn't struct page
>>> already complicated enough without adding another ifdef to it? Surely
>>> there's a better way than this.
>>
>> This discussion thread just got dropped off the radar, sorry about it.
>> None of the spinlock_t elements are required unless split ptlocks are
>> in use. I understand your concern regarding yet another #ifdef in the
>> struct page definition. But this change is simple and minimal. Do you
>> have any other particular alternative in mind which I could explore ?
>
> Do nothing? I don't understand what problem you're trying to solve.
Currently there is an element (spinlock_t ptl) in the struct page for page
table lock. Although a struct page based spinlock is not even required in
case USE_SPLIT_PTE_PTLOCKS evaluates to be false. Is not that something to
be fixed here i.e drop the splinlock_t element if not required ?
The problem is USE_SPLIT_PTE_PTLOCKS and ALLOC_SPLIT_PTLOCKS get evaluated
independently, although they are inherently dependent. ALLOC_SPLIT_PTLOCKS
could just be set to 0, when USE_SPLIT_PTE_PTLOCKS evaluates to be 0. This
patch makes that dependency explicit and also fixes the above situation.
next prev parent reply other threads:[~2021-07-05 3:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 7:33 Anshuman Khandual
2021-05-20 11:17 ` Matthew Wilcox
2021-07-01 5:21 ` Anshuman Khandual
2021-07-01 12:57 ` Matthew Wilcox
2021-07-05 3:27 ` Anshuman Khandual [this message]
2021-07-05 3:28 ` Matthew Wilcox
2021-07-05 3:39 ` Anshuman Khandual
2021-07-05 11:30 ` Matthew Wilcox
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=45c1feaa-4bab-91d1-6962-81549d2b6d00@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rdunlap@infradead.org \
--cc=vbabka@suse.cz \
--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