lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 5 Jul 2021 04:28:33 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Anshuman Khandual <anshuman.khandual@....com>
Cc:     linux-mm@...ck.org, akpm@...ux-foundation.org,
        Vlastimil Babka <vbabka@...e.cz>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/thp: Make ALLOC_SPLIT_PTLOCKS dependent on
 USE_SPLIT_PTE_PTLOCKS

On Mon, Jul 05, 2021 at 08:57:54AM +0530, Anshuman Khandual wrote:
> 
> 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 ?

No?  It doesn't actually cause any problems, does it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ