Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9664189rwd; Wed, 21 Jun 2023 10:09:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wE2nXzhoZnNXo0WbHAN1aAskRoJjx8ZZGVIWymSavdXkRogsmtjhwUbCL9Eyk93uw7KAP X-Received: by 2002:a05:6a00:2e93:b0:666:d78c:33ab with SMTP id fd19-20020a056a002e9300b00666d78c33abmr21495339pfb.21.1687367368451; Wed, 21 Jun 2023 10:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687367368; cv=none; d=google.com; s=arc-20160816; b=zoqm5YZMeNris+cfSQR87CJUlOVfRNsXZe1TjWFKwV2Su9D9cbflIGOLLFBaRyDjnf 4AYsSw5BcrdccR5WyMOuYFh7HM4Lv+B2pcmAhQjIvT1N/Nz6MYi/ahlzXvqQGy3O74AW +yC5XYqaJP+GUz46leu+kZHD5wNvl7bpj2fRuizl/TcIsqtjHuzrGQO18GlDT9K/uSHw Nl4KQ6IJhyMuorOiMnuztbuuaIkEMLsriq15avuQqrYPCFP0Hzqvt+meYzIRxe3/Us2H P/Hp6X3RWO668N3sFS43w6q4SV9aSVhwQez4WYKUgQ4FWRYxeXnzymgv95hgwuvRTmPE COew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=5tByu8XITmDKvX8hXlvbOWWnFrcTxlqP20ZM5PMzDZk=; b=qFSKVR1ExhVKUvprCg5ceDIKIhin2u1Knmc6Fk7n87EYTGXWrS4kqqJZ/h69XsQWdm w1Bf2F86aYHXQvrDADDzdMU6qqS043vi0iu45aDq2U6SHZkX5XLlMWNywB6EB2Sguj6k TVlfozeeFn9GXCG3qEuEv3iW8jBqfNpDRJGmEAg0uACUHUPu1rs1PJs6z7s1fsWxiOaP mK642Y4RHJQB5wcWCVfi8nS19NcmX8BLstI3cy0K5TamQHoBi2kFyw/DNwlveQgezocQ 2Heic/aY1mPm3DBoY5aD9jGeV12M5U+nkZeMPDfh9qMC4v5s8Ckkxd8V4MSpFwIayBa5 3cDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w135-20020a627b8d000000b00666eb445adbsi3433965pfc.46.2023.06.21.10.08.58; Wed, 21 Jun 2023 10:09:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbjFUQu2 (ORCPT + 99 others); Wed, 21 Jun 2023 12:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbjFUQuO (ORCPT ); Wed, 21 Jun 2023 12:50:14 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A4AE1BD4 for ; Wed, 21 Jun 2023 09:49:49 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8DxuMUsKpNkOjUAAA--.364S3; Thu, 22 Jun 2023 00:49:48 +0800 (CST) Received: from [10.20.42.43] (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxzM4sKpNkIO8AAA--.5610S3; Thu, 22 Jun 2023 00:49:48 +0800 (CST) Message-ID: <866f4e8d-98be-0aaf-d3a2-f3e5bc94e945@loongson.cn> Date: Thu, 22 Jun 2023 00:49:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v10 07/11] drm/etnaviv: Add support for the dma coherent device Content-Language: en-US To: Lucas Stach , Sui Jingfeng <18949883232@163.com>, Russell King , Christian Gmeiner , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, Philipp Zabel , Bjorn Helgaas References: <20230620094716.2231414-1-18949883232@163.com> <20230620094716.2231414-8-18949883232@163.com> <8f74f0962c8bab6c832919a5340667c54e1a7ddc.camel@pengutronix.de> <66fc74ae-299c-a5de-9cfb-07ae24fb3f07@loongson.cn> <8212078bd56c54ce508205eae0ed0b69e78d4c38.camel@pengutronix.de> From: Sui Jingfeng Organization: Loongson In-Reply-To: <8212078bd56c54ce508205eae0ed0b69e78d4c38.camel@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8DxzM4sKpNkIO8AAA--.5610S3 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj9xXoW7Gr4rCw17Cr4rWFW8Jr1rKrX_yoWDtrXEga y7AFyvkw1Utry2gwsxK3y8AF9F9rW8KF1DXrWfZ3yIy3s7Jan7Jr1kKrWfZw1fKrsFgrnx u34fZF1Yya12gosvyTuYvTs0mTUanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbq8YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267AKxVW8 JVW8Jr1ln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2 x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5 McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7 I2V7IY0VAS07AlzVAYIcxG8wCY1x0262kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCF x2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVW3AVW8Zr1lx2IqxVAqx4xG67AKxV WUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI 7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r 4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI 42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4Xo7DUUUU X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,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 Hi On 2023/6/21 23:58, Lucas Stach wrote: >> you approach forbidden any possibility to use the WC BO at anywhere. >> >> >> My approach need only check once, while you approach need at least 3 >> check plus >> >> so much bit-wise logic operations,  plus a function call  (&, ==, &&, >> &, ~, &) . >> >> and every time you create a BO. This nasty judgement happens. >> > BO creation again is not a fast path. You are committing to allocate > new memory, which is a few orders of magnitude more costly than the few > instructions needed for those comparisons. > What's wrong with you point here is that We are not going make it more worse because it is worse. We would like same any single bit of the performance. It's about the beauty, and beauty and correctness is every thing. My implement is good both in the perspective of beauty and in the perspective of the performance. BO creation is fast or not is irrelevant to what the point we are discuss. You are always introduce non-critical factor to disturb the discuss, leading the people go a wrong direction. -- Jingfeng