From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60648C11F64 for ; Thu, 1 Jul 2021 12:57:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D200561406 for ; Thu, 1 Jul 2021 12:57:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D200561406 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 39AC68D02A2; Thu, 1 Jul 2021 08:57:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34AE08D0001; Thu, 1 Jul 2021 08:57:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 213628D02A2; Thu, 1 Jul 2021 08:57:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id F302F8D0001 for ; Thu, 1 Jul 2021 08:57:52 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B2F8225F25 for ; Thu, 1 Jul 2021 12:57:52 +0000 (UTC) X-FDA: 78314021184.06.F0ACBCB Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP id D63E9D000168 for ; Thu, 1 Jul 2021 12:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QRaGlVqQxKh9WQJkeW4dawAj001OxCCf88GK3Bqe4I4=; b=hxUEbXmA11V3cAoBt8+TuCIy7Q bQjoQGrS0GOkh7nTMlsWDCxuJXu4BdK7DOAj/0Jh3U/894aT3Ih19pOtVbc+jntu5/v4yXb6zN6o8 uVtOiV6tqmoOGJKoMR2agcXOclbxGPV5qzZy7eYl8o2gkSXl6VQ6kOgEgeEIXd27cSTeJy6e2MGop ltWtp8p82SmIwM4zjt5jjDelEJODajk3PheJJ2/9VsBLhpePhpn0VkPvtClESodvJit23Ntl79ca5 JmAqO/ovwDPQsO7goZFYMN9ZOWyF2JO3uu+OdZ/Eqk42H5rbM2Gd2QlnFj8V3d0j1WJ0NADcRama0 O0WQsWOg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lywG1-006ZTc-7r; Thu, 01 Jul 2021 12:57:33 +0000 Date: Thu, 1 Jul 2021 13:57:29 +0100 From: Matthew Wilcox To: Anshuman Khandual Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Vlastimil Babka , Randy Dunlap , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] mm/thp: Make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS Message-ID: References: <1621409586-5555-1-git-send-email-anshuman.khandual@arm.com> <9d1ce685-e0fd-febd-5ff2-179f7fa6e3fa@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d1ce685-e0fd-febd-5ff2-179f7fa6e3fa@arm.com> Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=hxUEbXmA; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D63E9D000168 X-Stat-Signature: uhoke4x7fb6jpfkd1nfdtzihjfyjr5q7 X-HE-Tag: 1625144271-363839 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.