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=-4.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 AFE74C433E6 for ; Thu, 4 Feb 2021 07:53:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1076F64F41 for ; Thu, 4 Feb 2021 07:53:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1076F64F41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C4B1D6B0005; Thu, 4 Feb 2021 02:53:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD2C16B006C; Thu, 4 Feb 2021 02:53:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A4CD66B006E; Thu, 4 Feb 2021 02:53:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id 896256B0005 for ; Thu, 4 Feb 2021 02:53:20 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 528348249980 for ; Thu, 4 Feb 2021 07:53:20 +0000 (UTC) X-FDA: 77779820160.16.deer83_2009c57275da Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 2E55D100E690B for ; Thu, 4 Feb 2021 07:53:20 +0000 (UTC) X-HE-Tag: deer83_2009c57275da X-Filterd-Recvd-Size: 5111 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Feb 2021 07:53:19 +0000 (UTC) Received: by mail-ej1-f47.google.com with SMTP id i8so3671563ejc.7 for ; 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=RfrwH4y3EWSudzG5Zc7rG7w0ueaKntUZYwLUhI1BvL1Z/KJrkpF4M12MQv1cRiBFiq I5p5ASlLl2JbrOBw1uDQiRLvVZBRrsTH3jk9Ncv0QfIfNxycgohifgHMJYw7heOgp2aJ qfgikk3/tRE5WYHV2eiwMDjg+3QF6+JQEXVDIta4eiL7h4ub2sg2B9LC6nxRsaxoGNHa 4ty3TMltyZQaxdMHkDJay+JlUOj9FbV/0YVe95vYCpkeS6MlYGUJhM5Zw83UCQ90IQUe bEqj6aQgthQX0Shc1brRpLKG9dc+TWmGgIkTvEF0E77jdTCbgxl+k+0A6RWdFLtCgq06 ZIpg== X-Gm-Message-State: AOAM532sahOIn7konJmmOeYkswpxwok9HFG15Bc+EAApqryKYqycyYVd By9c7CYKA6eAyJ1H97tCg6o= X-Google-Smtp-Source: ABdhPJxmOioRMuyDm1Puy9HUCj+qibrAoLklBS9/vQschT6m+hlxaFoBzExrk2acsmkXA8jSOENf/g== 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 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: 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.