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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 59ABEC432BE for ; Fri, 13 Aug 2021 07:45:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C70E60F14 for ; Fri, 13 Aug 2021 07:45:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239512AbhHMHph (ORCPT ); Fri, 13 Aug 2021 03:45:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22742 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239456AbhHMHpe (ORCPT ); Fri, 13 Aug 2021 03:45:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628840707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7Teq8UbagtozxN4Eo3VM2ctv7Q0KnaAQlxa4UWyV9YQ=; b=LpLwWa8xuRo2ulFyIH0Hl9TMfl30Xf7EZiVMb0j+9QgSjchTZMAa8hzReLze7cpUW/eGJO cdi5vpF6ZdKIuR7sW57cp+V+hLE5LGl2NxD9QcaKLjd7ZhbJtcIJN3+3mI+Xrjeh0NzYjS cSRs9sWqJgMUeQQWr9683vfL/XD0FgY= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-GYSEM9NjPcuo5P15DuC5Yw-1; Fri, 13 Aug 2021 03:45:05 -0400 X-MC-Unique: GYSEM9NjPcuo5P15DuC5Yw-1 Received: by mail-wr1-f72.google.com with SMTP id a9-20020a0560000509b029015485b95d0cso2654196wrf.5 for ; Fri, 13 Aug 2021 00:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=7Teq8UbagtozxN4Eo3VM2ctv7Q0KnaAQlxa4UWyV9YQ=; b=b2zO6omtYz23rmz7/ODyOH+jcxARtd55DNpvv607KH0h4tLBGl+6FnZTb67VZpRBmg GvmeKuyRM/2EWe3nFdJMrzCujKf+fLpEMWedkw5HD7YYpEKhvYpqz3FwF4Xn7jChBBjs xdaY6I8uuWsbjsKkDFTY/ZHUIhR8dnl6BC++lkKyeBcMtN3t9cl9KvZChOcvJuNE0mwd O2VtcTsi8CYProLDa78gfmMRQWre6WTrZYv8gNd2DHxyjVI9xCfoWSvrTm5LZvuPeePf nGLNDCWMLOu6qzqc8QCzxVv43+0X9X85kHgfNBwg/Ia+yJ9v8fDnIc589eu3e4dzwdq5 cxsQ== X-Gm-Message-State: AOAM532I3+T27d3s1UTP2SCXlSIw7TybcJ04e89/SU6RqGWnSbv4G+kt WzZmionPpQJ9lJK/16QhPVD5xEdzoxI+3g4SdOUlCPD7iTD1ybA2vXHoTt+m/0qD9Wp2nTVjabO 56Eccv+QZ8+GBz/ul5Lo1+AXD X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr1344995wms.104.1628840704142; Fri, 13 Aug 2021 00:45:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSjOWohJfjAJ+7FUzSyKi8N1Le4n6LYsBXwpgNlp369MQ4VMbQeGmfTi+w5r4HJ/tWLnckVA== X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr1344978wms.104.1628840703928; Fri, 13 Aug 2021 00:45:03 -0700 (PDT) Received: from [192.168.3.132] (p5b0c66ea.dip0.t-ipconnect.de. [91.12.102.234]) by smtp.gmail.com with ESMTPSA id h16sm742166wre.52.2021.08.13.00.45.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Aug 2021 00:45:03 -0700 (PDT) Subject: Re: An cma optimization patch is used for cma_[alloc|free]. To: Jichao Zou , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "minchan@kernel.org" , "song.bao.hua@hisilicon.com" , "hch@lst.de" , "m.szyprowski@samsung.com" , "robin.murphy@arm.com" , "iommu@lists.linux-foundation.org" , JianQi Yang , Yanjune Tian References: From: David Hildenbrand Organization: Red Hat Message-ID: Date: Fri, 13 Aug 2021 09:45:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.08.21 09:00, Jichao Zou wrote: > Pre-allocate CMA memory that configured in device > tree, this greatly improves the CMA memory > allocation efficiency, cma_[alloc|free] is less > than 1ms, old way is took a few ms to tens or > hundreds ms. > Please send patches as proper emails (man git-format-patch; man git-send-email). What you propose is turning cma reservations into something comparable to permanent boottime allocations. From the POV of the buddy, the pages are always allocated and cannot be repurposed for e.g., movable allocations until *actually* allocated via CMA. I don't think we want this behavior upstream. -- Thanks, David / dhildenb 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=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 23D66C432BE for ; Fri, 13 Aug 2021 07:45:15 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D555E60F14 for ; Fri, 13 Aug 2021 07:45:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D555E60F14 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A893D80D80; Fri, 13 Aug 2021 07:45:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1jZT0LLJnA_D; Fri, 13 Aug 2021 07:45:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 905CB80D1C; Fri, 13 Aug 2021 07:45:10 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 740BAC001A; Fri, 13 Aug 2021 07:45:10 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 354DEC000E for ; Fri, 13 Aug 2021 07:45:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 24B966070A for ; Fri, 13 Aug 2021 07:45:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7V7JK12Qmrhw for ; Fri, 13 Aug 2021 07:45:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 1A23760642 for ; Fri, 13 Aug 2021 07:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628840706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7Teq8UbagtozxN4Eo3VM2ctv7Q0KnaAQlxa4UWyV9YQ=; b=eOr8qvN6Md6PRFI46NnF40nrxzfpZnPoTOjC3rm14fLmYyedjg3UFwXJJDBGX4ni6xj1kf kinzRj2D6JEYfI/4tbrlw//ylRAzW4TzeeQ+iI1PduXlJD3uP0qH8qP3t6aX/jnSFUjC1Q JKXI2/DAF7IowMgle8bV6ETwSEfO3eI= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-3HzMV9ZkP7mH8iKJ8aMeXQ-1; Fri, 13 Aug 2021 03:45:05 -0400 X-MC-Unique: 3HzMV9ZkP7mH8iKJ8aMeXQ-1 Received: by mail-wr1-f71.google.com with SMTP id w1-20020adf8bc10000b0290154bed98988so2659831wra.1 for ; Fri, 13 Aug 2021 00:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=7Teq8UbagtozxN4Eo3VM2ctv7Q0KnaAQlxa4UWyV9YQ=; b=gObhW9giF0tjtZXd3ehpxbtcR+nYnq1d2ysPKGUBeaMNffXuW3Tt2OlWrm13bn49ue bqgoCyFzVxKzBCt2YhulIHKu/WhIfgnZxof2d+FkKPoNNgtItCJmRn/suv36A2vZDPBB A6SyaFUqoEmDRXR6irKelgi4juLPVmKtQ0DBWdD8y2iusmc+63134wNJL8f/vaMmDYoD wr5hI0x7R2QhOQ7LEOKulbZhVhVQSTclm1ej17lWmg+oGV9HtwPJhCbKJELempw9/XBu 0+WGpXVJ9m6OHiWFMVuiOyvD1wvRTksGhh/22Za9toI0c3CP+fPjKPUszzuO0Fr5F0P+ VgPQ== X-Gm-Message-State: AOAM532N3wMpkVuVyBhEXHdzJGNqGCUEfqaoKP778wT/f7WCAulX55gK RU+ptkcrYKPQX9slKX0D02p1/qk49fXZ46WEnAFNYZxRbAd9MAC5LCu5kfPT/l3IzADi8umlSIi 7bbhQc+Bv9khwZIk+xhpL/27y6JkznA== X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr1344994wms.104.1628840704142; Fri, 13 Aug 2021 00:45:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSjOWohJfjAJ+7FUzSyKi8N1Le4n6LYsBXwpgNlp369MQ4VMbQeGmfTi+w5r4HJ/tWLnckVA== X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr1344978wms.104.1628840703928; Fri, 13 Aug 2021 00:45:03 -0700 (PDT) Received: from [192.168.3.132] (p5b0c66ea.dip0.t-ipconnect.de. [91.12.102.234]) by smtp.gmail.com with ESMTPSA id h16sm742166wre.52.2021.08.13.00.45.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Aug 2021 00:45:03 -0700 (PDT) Subject: Re: An cma optimization patch is used for cma_[alloc|free]. To: Jichao Zou , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "minchan@kernel.org" , "song.bao.hua@hisilicon.com" , "hch@lst.de" , "m.szyprowski@samsung.com" , "robin.murphy@arm.com" , "iommu@lists.linux-foundation.org" , JianQi Yang , Yanjune Tian References: From: David Hildenbrand Organization: Red Hat Message-ID: Date: Fri, 13 Aug 2021 09:45:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gMTMuMDguMjEgMDk6MDAsIEppY2hhbyBab3Ugd3JvdGU6Cj4gUHJlLWFsbG9jYXRlwqBDTUHC oG1lbW9yecKgdGhhdMKgY29uZmlndXJlZMKgaW7CoGRldmljZQo+IHRyZWUswqB0aGlzwqBncmVh dGx5wqBpbXByb3Zlc8KgdGhlwqBDTUHCoG1lbW9yeQo+IGFsbG9jYXRpb27CoGVmZmljaWVuY3ks wqBjbWFfW2FsbG9jfGZyZWVdwqBpc8KgbGVzcwo+IHRoYW7CoDFtcyzCoG9sZMKgd2F5wqBpc8Kg dG9va8KgYcKgZmV3wqBtc8KgdG/CoHRlbnPCoG9yCj4gaHVuZHJlZHPCoG1zLgo+IAoKUGxlYXNl IHNlbmQgcGF0Y2hlcyBhcyBwcm9wZXIgZW1haWxzIChtYW4gZ2l0LWZvcm1hdC1wYXRjaDsgbWFu IApnaXQtc2VuZC1lbWFpbCkuCgpXaGF0IHlvdSBwcm9wb3NlIGlzIHR1cm5pbmcgY21hIHJlc2Vy dmF0aW9ucyBpbnRvIHNvbWV0aGluZyBjb21wYXJhYmxlIAp0byBwZXJtYW5lbnQgYm9vdHRpbWUg YWxsb2NhdGlvbnMuIEZyb20gdGhlIFBPViBvZiB0aGUgYnVkZHksIHRoZSBwYWdlcyAKYXJlIGFs d2F5cyBhbGxvY2F0ZWQgYW5kIGNhbm5vdCBiZSByZXB1cnBvc2VkIGZvciBlLmcuLCBtb3ZhYmxl IAphbGxvY2F0aW9ucyB1bnRpbCAqYWN0dWFsbHkqIGFsbG9jYXRlZCB2aWEgQ01BLgoKSSBkb24n dCB0aGluayB3ZSB3YW50IHRoaXMgYmVoYXZpb3IgdXBzdHJlYW0uCgotLSAKVGhhbmtzLAoKRGF2 aWQgLyBkaGlsZGVuYgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18KaW9tbXUgbWFpbGluZyBsaXN0CmlvbW11QGxpc3RzLmxpbnV4LWZvdW5kYXRpb24ub3Jn Cmh0dHBzOi8vbGlzdHMubGludXhmb3VuZGF0aW9uLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2lvbW11