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 E75DBC433ED for ; Tue, 6 Apr 2021 09:19:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 47DDF613B3 for ; Tue, 6 Apr 2021 09:19:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47DDF613B3 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 C4E436B007E; Tue, 6 Apr 2021 05:19:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFEAC6B0080; Tue, 6 Apr 2021 05:19:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7A1F6B0081; Tue, 6 Apr 2021 05:19:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 88E5C6B007E for ; Tue, 6 Apr 2021 05:19:20 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 39C888248047 for ; Tue, 6 Apr 2021 09:19:20 +0000 (UTC) X-FDA: 78001393680.30.CE38206 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 6CA69E000108 for ; Tue, 6 Apr 2021 09:19:14 +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=TqTPRJB6pZK08YcdPYvz3/pZzL7+uFHBrxcaKm3Xi1A=; b=MrCz+oMav654oV72hg2MNg8+yU gT5QdzdWqliNIecjvZaK4E+bNAdcrX+vCVxCWzhnJ3D3yD7v5zrDD2/MpJTwg9DMnlV+mTCkA2qCz aONRXc99DtkQ2qmxqMzp0X75zhdYceBqf0t37s9wegIN5MUyKRLAhiEhVKv4gMCjSaLKqw+yAZBiA JPpslvFu9852P59/Nvv34Sof3BO8+5CnbJiazNer7u+5RXOm5q8OfvjpxM6JAXDgblBFC0xailfV4 w8U5rb29d+ObCG5VPvfPxVhnz2ZCSyQSKL1lLqjeJf5ZD8pVzu2/TsnZXURmj3uUQFykcp1Gt4gXH xcl8u+VQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lThqJ-00CZLg-7f; Tue, 06 Apr 2021 09:18:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EFECE30377D; Tue, 6 Apr 2021 11:17:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BB95C2BAE8C25; Tue, 6 Apr 2021 11:17:48 +0200 (CEST) Date: Tue, 6 Apr 2021 11:17:48 +0200 From: Peter Zijlstra To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Roman Gushchin , Michal Hocko , Shakeel Butt , Oscar Salvador , David Hildenbrand , Muchun Song , David Rientjes , Miaohe Lin , Matthew Wilcox , HORIGUCHI NAOYA , "Aneesh Kumar K . V" , Waiman Long , Peter Xu , Mina Almasry , Hillf Danton , Joonsoo Kim , Barry Song , Will Deacon , Andrew Morton Subject: Re: [PATCH v4 1/8] mm/cma: change cma mutex to irq safe spinlock Message-ID: References: <20210405230043.182734-1-mike.kravetz@oracle.com> <20210405230043.182734-2-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210405230043.182734-2-mike.kravetz@oracle.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6CA69E000108 X-Stat-Signature: bonhd4j4jcyzizpxut4mmwjsi5scxura Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617700754-319519 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 Mon, Apr 05, 2021 at 04:00:36PM -0700, Mike Kravetz wrote: > The lock doesn't protect any sleepable operation so it can be changed to > a (irq aware) spin lock. The bitmap processing should be quite fast in > typical case but if cma sizes grow to TB then we will likely need to > replace the lock by a more optimized bitmap implementation. Or an rb-tree that stores ranges, which should also be much cheaper storage wise, for those sizes.