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.1 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,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 7B91DC4338F for ; Fri, 13 Aug 2021 07:45:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0659061042 for ; Fri, 13 Aug 2021 07:45:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0659061042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 129D66B0071; Fri, 13 Aug 2021 03:45:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B3576B0072; Fri, 13 Aug 2021 03:45:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E96F56B0073; Fri, 13 Aug 2021 03:45:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id CF1166B0071 for ; Fri, 13 Aug 2021 03:45:07 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8CDD619472 for ; Fri, 13 Aug 2021 07:45:07 +0000 (UTC) X-FDA: 78469271454.14.9E7F7E8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf23.hostedemail.com (Postfix) with ESMTP id 3501F90093E2 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-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-Qz-wxWlVO3-Pb87IQfsTWA-1; Fri, 13 Aug 2021 03:45:05 -0400 X-MC-Unique: Qz-wxWlVO3-Pb87IQfsTWA-1 Received: by mail-wr1-f70.google.com with SMTP id m5-20020a5d6a050000b0290154e83dce73so2607874wru.19 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=grYAayZz1akPCnCUPYQMme77ehR66er2YfoCbiKHB8FjqYwrJdiSWm2fYz146XI/I0 VvTQAqjJ5QV3tNl2Hq9FA8ctljUu/XwnamUD6/qXBQP8VtfsbunHxf+fBsqt5VC1ZKmV tiv1xJ4YsMC5DNnTda1BTmY6jnfQlYq+Vamr9G/V4Bzs/+Ap9hx+BES5LXN3/3cDimTg KDTkr5j3VgPu4caxqmlQGn03ZGc3Y6L9xy5SI3nedPHUcKt2k/2O59Rmk1h/e2IiziMv +YVTW78/UFqDboALKhZ4VjXDs3OwmRuH23p9k/o+ypcHWPM2VNmXhBG+d0bvRfE541QH 6TsQ== X-Gm-Message-State: AOAM530MTQmOJGmwqYgRdd7m8PEzKNu3awBW/Aa7nnsVrE5m3kdtrAAn lps1BbKX4jwFF1ajOcCitVOwwHlp4ImhGkFXYAg7CdQHslB3FEO1zfNF+1ExtwBfWTCws7z3GOA GGcxNcAUVA3Y= X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr1344992wms.104.1628840704141; 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eOr8qvN6; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf23.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Stat-Signature: iwon95pma3kxt5tahprekmzkn9xji19c X-Rspamd-Queue-Id: 3501F90093E2 X-Rspamd-Server: rspam05 X-HE-Tag: 1628840707-625815 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.019466, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 13.08.21 09:00, Jichao Zou wrote: > Pre-allocate=C2=A0CMA=C2=A0memory=C2=A0that=C2=A0configured=C2=A0in=C2=A0= device > tree,=C2=A0this=C2=A0greatly=C2=A0improves=C2=A0the=C2=A0CMA=C2=A0memor= y > allocation=C2=A0efficiency,=C2=A0cma_[alloc|free]=C2=A0is=C2=A0less > than=C2=A01ms,=C2=A0old=C2=A0way=C2=A0is=C2=A0took=C2=A0a=C2=A0few=C2=A0= ms=C2=A0to=C2=A0tens=C2=A0or > hundreds=C2=A0ms. >=20 Please send patches as proper emails (man git-format-patch; man=20 git-send-email). What you propose is turning cma reservations into something comparable=20 to permanent boottime allocations. From the POV of the buddy, the pages=20 are always allocated and cannot be repurposed for e.g., movable=20 allocations until *actually* allocated via CMA. I don't think we want this behavior upstream. --=20 Thanks, David / dhildenb