Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1520155pxb; Thu, 4 Feb 2021 15:31:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJybX8wLDxteTr/ijAbaMxXSCJlUgpRTIsqc/dJLrGAM7Q66YPlfu/t6D1xSz49NPurUjEhw X-Received: by 2002:a17:906:b106:: with SMTP id u6mr1355111ejy.313.1612481503065; Thu, 04 Feb 2021 15:31:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481503; cv=none; d=google.com; s=arc-20160816; b=t0h571eqPNS+kH/zU3m7bk/oq//PTPsrTzVqQ5s8Iuw57aFsyrSjo/OSTCByxtqmol +r4xLqDGHg9g183X/r/rd+M+DFJg2uKixFogPaZWghOzVjZeNUKfIhnIXU1fbuofjEyE x99bE9kpV5s1MYhgcjKzZrtzeA48SyNB3+4+X+t4Igzl6vtFTj8+626cgwDPgxkcKaXo GF4nkqk4+X6HxNdZ4ikU3ALUJJad1IfQK1+1rxX2Bm6YE2Jt4GHiGJaNKWTpdxIxDcxX GwGw/54XSh14uBQODAjlfyWk5/sgjmjAugu+7f3ujMr1YNbwl2JFUse9HRuZg7eb9MiL 3czQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:reply-to:dkim-signature; bh=J5U7ZYjn0rPv+kixT24fufumtWsmbJ865vX1gjaUF0g=; b=ofqT/zwm+syGQ0wecn8n7i/h7FMzfN6uRn4P16K22YOyiLzfU4jVvWdU8pfV9U+veW voYUYGoUzocNp+nTd0HK6/jSuu6yZ+gV/zYrQtar93oq44+Y6iRf037RxgFosNLgj/Vx R1zmVqk0vq6H8KRN8ynQ9KEU0jWIx2tqiI69ekbCDjB6xD7DFK/l6uaepaeXWj+tmM80 ql+tJMLqA26st55e5nlb4QTuE1F1co8yROwLUpaiA1BvEv6rnsxEttE/6ZTuY5m0FZWQ VQHc390Ok+KwnzAAh8caBpccheW1PA3bNDjuLdlJcHYXdQrAz7gBOpWsuxCkfI+CrBhZ KYqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KswjM1SU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si5388006edf.469.2021.02.04.15.31.17; Thu, 04 Feb 2021 15:31:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KswjM1SU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbhBDHyD (ORCPT + 99 others); Thu, 4 Feb 2021 02:54:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232487AbhBDHyA (ORCPT ); Thu, 4 Feb 2021 02:54:00 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCB3C0613D6; Wed, 3 Feb 2021 23:53:19 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id w1so3618393ejf.11; Wed, 03 Feb 2021 23:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=J5U7ZYjn0rPv+kixT24fufumtWsmbJ865vX1gjaUF0g=; b=KswjM1SUYJoTfbNOQjudNoUn3epf+FgmwInfQV6P8D1wCRR3k/JPEqKz0WMeFwWl2u EtYRsJ0ITHV+Rn4hVd6MrPfmX+j6SEGOH7q1mPrs7m2PkRZzag7JCDeWJNhtFqzZSjxX bt3bMmVwLRMbqoNMBP69aDKbprQaMM07TtRNJGxLfEdSbFQgAhulGu5zstTSnL/PouTV z5JaLL6FOgYf14roRI0afyz3a4I8Hv4YWhX/oYfesI/sm22W0jTpjrsXSWYC1Rf+KH60 /ApBI5MIIDz2fpAwj034PDrnzqqtBL1JXloPTCkxb7LFOusGN5A7z2ao80vvQNtjE5lO 5Jzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=J5U7ZYjn0rPv+kixT24fufumtWsmbJ865vX1gjaUF0g=; b=Sxh/kL4fjkHQZTRW7YzeDUU9OzSeRPJDvwjr3mGqAiJSISA4N1e5D+rTpi2AmRbRYu g1mR+EL/mNdZ/gVztNwtMOxQTa3ZsrslufD9xgZTXByWOjndlAIq//SB9j18i8J8r1sA 5jIUjzIC51VF9l5+tQhYIXINdCaH3wvzlB7yZpaKYmM1uHbXaJqVhvBJcyW7ZPCrfNaO lpxBA1wLyiFK9sQREkJFsY1+Ku3kIwa/8X4dwJB7EnkvFh6xd9k6yFOZw5Uz8Pl/AyU2 V6GYh8nSxf57+L3eIRbGEsBAx8zaz8TNYSMOHDRt+v9E6gDYo0Gd6dWy5Klx+Rw9cwYA Iz2Q== X-Gm-Message-State: AOAM531AhPZlVb/dmiYDGmpEP+itGeMgHXz9+oCedDhStbJcKq4+D/1G PWBfxoKLiofhP9ev05lh1BtfLp2HYb0= X-Received: by 2002:a17:907:9810:: with SMTP id ji16mr6686661ejc.394.1612425198446; Wed, 03 Feb 2021 23:53:18 -0800 (PST) Received: from ?IPv6:2a02:908:1252:fb60:be8a:bd56:1f94:86e7? ([2a02:908:1252:fb60:be8a:bd56:1f94:86e7]) by smtp.gmail.com with ESMTPSA id p16sm2010968edw.44.2021.02.03.23.53.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Feb 2021 23:53:17 -0800 (PST) Reply-To: christian.koenig@amd.com Subject: Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error To: Suren Baghdasaryan , Daniel Vetter Cc: Christoph Hellwig , Sandeep Patil , dri-devel , Linux MM , Robin Murphy , James Jones , Linux Kernel Mailing List , Matthew Wilcox , Brian Starkey , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Minchan Kim , John Stultz , Liam Mark , Chris Goldsworthy , Hridya Valsaraju , Andrew Morton , Android Kernel Team , =?UTF-8?Q?Christian_K=c3=b6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" References: <20210203003134.2422308-1-surenb@google.com> <20210203015553.GX308988@casper.infradead.org> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <96fb8d14-fd9d-c21d-fa9d-81748421c6d3@gmail.com> Date: Thu, 4 Feb 2021 08:53:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 03.02.21 um 21:20 schrieb Suren Baghdasaryan: > [SNIP] > If there is a reason to set this flag other than historical use of > carveout memory then we wanted to catch such cases and fix the drivers > that moved to using dmabuf heaps. However maybe there are other > reasons and if so I would be very grateful if someone could explain > them. That would help me to come up with a better solution. Well one major reason for this is to prevent accounting of DMA-buf pages. So you are going in circles here and trying to circumvent an intentional behavior. Daniel is right that this is the completely wrong approach and we need to take a step back and think about it on a higher level. Going to replay to his mail as well. Regards, Christian.