Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2183182rwo; Thu, 3 Aug 2023 06:04:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrGRwRMnLrJr7z+0hn7PMggxVGrtVJt0LYcOjCMpwQstbvSAkn23bv825FhxtOQnG+qXug X-Received: by 2002:a05:6a00:15d6:b0:668:73f5:dce0 with SMTP id o22-20020a056a0015d600b0066873f5dce0mr21468876pfu.29.1691067869526; Thu, 03 Aug 2023 06:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691067869; cv=none; d=google.com; s=arc-20160816; b=IhYqb5SmC05hkt3DjQHpb4jecBH/YqEuCZ3GfZAbD3V3QCJ142n5NjMOqtIyb85QTU vqPt0MEzazTIYMewdwXt3SKRxcHJFj1h58493jtIFqiYAgDx28/q40H++EtxnXbkYT2b 9Wa7aTJgxpaDMMRStfGsQURJTSrP5aLyBlfnf3x6u3VuDA3sDlYjs7B2KSWkwuD/SlMH 7Gr1/v3KzHJOdLiO/cosQ+KRfkejpsohX48v5KvFwslybieSHfZiZfDg+RzqsFNCtXcP F4rTOTe4O6BwTprylGdcRoAaBtfbLl3fpHdiLRFEc+nHUGKyRw6CfsJbt1pTxXvqiI8s b7zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sliJv3PaP1HUZH/mpFpwtE9mMKA1N2x7kS8Mfd1OETk=; fh=1aUjqJHVsOlKAzeArNvsvLAiCTuMEUe3w0cq8DVMLSM=; b=qbz9pGbIqKnQBTE4ZKhEmtE2pYlHrciDw7NHdClaWl56T2qnFqMXcE7VqwxScAd8cb YvcmtxROEzPThjh3V3pj7bc4iHvmPV1LmgrAL1m2UC/Y3cV6Ir+E1G4qGBRvTs1b804y S5r08wBGunLsr7ShJbreQvflFyywgf2JDimtjn0zbg/4fQwEP7ZTBglc7sPW3PfGic5A /afHsZ4kVUVXQenkVVVeHinKKQSNu7u+OYYGNcEhFc39yqUGDZwwraML8JpZuoJ+kz04 uS0ajKVNs9X6cf5gjx3e+Drvhm8goCOJI5HeL3NnANCJXb/sMXIdCoZ5VJLs8l0p1j3h FrKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J42Mo5/U"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g192-20020a636bc9000000b00557622a044esi12508443pgc.805.2023.08.03.06.04.10; Thu, 03 Aug 2023 06:04:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J42Mo5/U"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235521AbjHCMBI (ORCPT + 99 others); Thu, 3 Aug 2023 08:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234223AbjHCMBH (ORCPT ); Thu, 3 Aug 2023 08:01:07 -0400 Received: from mgamail.intel.com (unknown [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A670B134 for ; Thu, 3 Aug 2023 05:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691064066; x=1722600066; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WpiP6tIHJyDnELCjyGnEAZxhobpxPxNGSGyj5Hx3NIk=; b=J42Mo5/Ux3o6OBxueBWD10djpFb+P/ndkk8XNnkGgwPHrMkTj1bLt0Es 9Vtlsn9dB1fOzAQDesN55np7YIKcHvxyofKKf6Xvl0fzCIooKczwnWP8f W57zYOLfHzE89tTu4GqJ5v6pzk+BBinHHbVfJeAwrybeQ8UoWDwHDefO4 C+HIsTMaY6sjP4CgaNZjEX+/EkDBqn0Jx+F5Txwr2iDWEmx0r5u6xVhKc ihsJ29Tk8VSvvK4+AHdDZo0EHI0r12d83ljhACYTVQQFebLd6qMtfEhPz OwW1j5xR+zvRTiJMCbQKOaN2X2hD3DU2Veu8gBiT/7wC1EFwJQuThrGiZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="368750923" X-IronPort-AV: E=Sophos;i="6.01,252,1684825200"; d="scan'208";a="368750923" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 05:01:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="794975195" X-IronPort-AV: E=Sophos;i="6.01,252,1684825200"; d="scan'208";a="794975195" Received: from gvarshne-mobl2.gar.corp.intel.com (HELO box.shutemov.name) ([10.252.63.106]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 05:01:02 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 72801109FCF; Thu, 3 Aug 2023 15:01:00 +0300 (+03) Date: Thu, 3 Aug 2023 15:01:00 +0300 From: "Kirill A. Shutemov" To: Ryan Roberts Cc: Andrew Morton , Matthew Wilcox , Yin Fengwei , David Hildenbrand , Yu Zhao , Yang Shi , "Huang, Ying" , Zi Yan , Nathan Chancellor , Alexander Gordeev , Gerald Schaefer , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 0/3] Optimize large folio interaction with deferred split Message-ID: <20230803120100.2glxdc4yf7sjn7h5@box.shutemov.name> References: <20230727141837.3386072-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 02, 2023 at 05:42:23PM +0100, Ryan Roberts wrote: > - avoid the split lock contention by using mmu gather (suggested by Kirill) [Offlist] So, my idea is to embed struct deferred_split into struct mmu_gather and make zap path to use it instead of per-node/per-memcg deferred_split. This would avoid lock contention. If the list is not empty after zap, move the to the per-node/per-memcg deferred_split. But it is only relevant if we see lock contention. -- Kiryl Shutsemau / Kirill A. Shutemov