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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5AEBECAAD8 for ; Sun, 18 Sep 2022 23:12:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4337E940007; Sun, 18 Sep 2022 19:12:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E2F66B0073; Sun, 18 Sep 2022 19:12:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2361E940007; Sun, 18 Sep 2022 19:12:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0DB916B0072 for ; Sun, 18 Sep 2022 19:12:53 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D328D403FE for ; Sun, 18 Sep 2022 23:12:52 +0000 (UTC) X-FDA: 79926758184.07.570C039 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by imf09.hostedemail.com (Postfix) with ESMTP id 8875D140003 for ; Sun, 18 Sep 2022 23:12:52 +0000 (UTC) Received: by mail-qv1-f41.google.com with SMTP id l14so12303273qvq.8 for ; Sun, 18 Sep 2022 16:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=wvpTcnm9RKL2tVJ7oiw7DzzogtB5Fx17ivWfAb5DiHk=; b=pIdlRpQZD72JzZQzd8zbwuHyDbJRHFMvWAv5gP+k+WwO8xw3oaK80SdBXSp45NQ8A8 17+8exKn9YgZp/XPYbF5IWrbRmqwm0NkF4RdcZbFX7f4IlJGcfEp9vLyAZZyhR5X4HOc 0KrJ5FHH0Fk1WyA/c68RkUNw64+kwK4rFSekJTY598YL26NCUzTDQb4PAyqfSdi3lcoY mLTLlsNdhXMvlOyQKoDvMDI4cUCXpPL+naM1oRj5NwaTTv2gdsoq5lHqSJxxlgC7/MGa uPWNE92LE6Y1bYd95KARHfoPM/2mbOyxZ+o8LysfcPu5XwXIOxZCXMf+vSpS78Eqsc33 aydw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=wvpTcnm9RKL2tVJ7oiw7DzzogtB5Fx17ivWfAb5DiHk=; b=Pnq+qPYqvzDdil03vKx070vhx5Li+31yRzI56m7A0I19n+eKf/2jaCL9RjBlBV36Nz P4jNI91k5+ss3GIsP6/MvZJstP4pyPl2JxoBm+pxCBDh6hrshFsnvdmUx6OD1FRzauLU k0B32RGGe0fnEeXyuTzrP0k8WYrt5F9pNGe9kHgw3IOYg/8PjD0DS6A1BRhL+KbVYPyA D3BfAluIao6VRCLQ7S9iOsRH91dv71SCi4T4ZL03dNKOxjHSLe/Z4i6J+olXdwyIYYgb DPZQtpWdRZT+RYtmSnAd0JOJ45tCnruNDZ3J3PuDUVkKMXKpwH+7cpZs0U8irj+dcCQz 9+6A== X-Gm-Message-State: ACrzQf3wqr1KpU+b1R+M3r3MftEhdqPEClSAWcF9L2K7TGLA3ezQm6FX c4YpI8sMztpXqnNPbZo3JIE= X-Google-Smtp-Source: AMsMyM4ywyNNaawdwx+pT3MiAKcVQI5HVSBAdiiHi2Ex9A/5bu+0kdgt3Bo5Q37Bm5fvYbP0nDWDNw== X-Received: by 2002:a05:6214:2508:b0:4ad:1c2c:cc79 with SMTP id gf8-20020a056214250800b004ad1c2ccc79mr8785841qvb.79.1663542771812; Sun, 18 Sep 2022 16:12:51 -0700 (PDT) Received: from [192.168.1.50] (ip70-191-40-110.oc.oc.cox.net. [70.191.40.110]) by smtp.gmail.com with ESMTPSA id i10-20020ac84f4a000000b0031eb5648b86sm9324302qtw.41.2022.09.18.16.12.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 16:12:50 -0700 (PDT) Message-ID: Date: Sun, 18 Sep 2022 16:12:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH 16/21] dt-bindings: reserved-memory: introduce designated-movable-block Content-Language: en-US To: Krzysztof Kozlowski , Rob Herring Cc: Andrew Morton , Jonathan Corbet , Krzysztof Kozlowski , Frank Rowand , Mike Kravetz , Muchun Song , Mike Rapoport , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Borislav Petkov , "Paul E. McKenney" , Neeraj Upadhyay , Randy Dunlap , Damien Le Moal , Florian Fainelli , David Hildenbrand , Zi Yan , Oscar Salvador , Hari Bathini , Kees Cook , - , KOSAKI Motohiro , Mel Gorman , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux.dev References: <20220913195508.3511038-1-opendmb@gmail.com> <20220913195508.3511038-17-opendmb@gmail.com> <20220914145506.GA2149379-robh@kernel.org> <57f19774-39a1-03a6-fe68-83d7e4b16521@gmail.com> <07d87203-6fe1-c612-cb79-9080e1988454@linaro.org> From: Doug Berger In-Reply-To: <07d87203-6fe1-c612-cb79-9080e1988454@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663542772; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wvpTcnm9RKL2tVJ7oiw7DzzogtB5Fx17ivWfAb5DiHk=; b=WU/V/QqH2L2kExCIqKJHT+F2VhCcQoJ+xlqoXXZ17AuZjpJR1MfkBBk21G4w+W/sGqq48n N2pIa/W4zN1gpT24MdmA8zIUjQhm1LRKbgf+BOOEHYbYGRvqS/XaE7vmm4kmGwnKLykBG8 pjmq31hba7oWj0Wly9Knj2s/oY3e454= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pIdlRpQZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of opendmb@gmail.com designates 209.85.219.41 as permitted sender) smtp.mailfrom=opendmb@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663542772; a=rsa-sha256; cv=none; b=44mUmbDhVB7TJohgd5HAVwxNiOTT81sVgBqFTHHXwg3KZ7CKKNMS4E/PIWD0rhpUZKKYc/ CrJJgxxHYgIJxxSL566Tm+9nS8pyHsPfZr9E8jL5M+TNrt+yG2rQQdj2etk21l8czHZ/O/ 8W4u6tM/uYRujQVPvLUg5AizmxbJ5Ag= X-Stat-Signature: e33rg14qaipk897hz1bpo6tcx6t7gio6 X-Rspamd-Queue-Id: 8875D140003 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pIdlRpQZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of opendmb@gmail.com designates 209.85.219.41 as permitted sender) smtp.mailfrom=opendmb@gmail.com X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1663542772-765005 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: On 9/18/2022 3:31 AM, Krzysztof Kozlowski wrote: > On 14/09/2022 18:13, Doug Berger wrote: >> On 9/14/2022 7:55 AM, Rob Herring wrote: >>> On Tue, Sep 13, 2022 at 12:55:03PM -0700, Doug Berger wrote: >>>> Introduce designated-movable-block.yaml to document the >>>> devicetree binding for Designated Movable Block children of the >>>> reserved-memory node. >>> >>> What is a Designated Movable Block? This patch needs to stand on its >>> own. >> As noted in my reply to your [PATCH 00/21] comment, my intention in >> submitting the entire patch set (and specifically PATCH 00/21]) was to >> communicate this context. Now that I believe I understand that only this >> patch should have been submitted to the devicetree-spec mailing list, I >> will strive harder to make it more self contained. > > The submission of entire thread was ok. What is missing is the > explanation in this commit. This commit must be self-explanatory (e.g. > in explaining "Why are you doing it?"), not rely on other commits for > such explanation. > >> >>> >>> Why does this belong or need to be in DT? >> While my preferred method of declaring Designated Movable Blocks is >> through the movablecore kernel parameter, I can conceive that others may >> wish to take advantage of the reserved-memory DT nodes. In particular, >> it has the advantage that a device can claim ownership of the >> reserved-memory via device tree, which is something that has yet to be >> implemented for DMBs defined with movablecore. > > Rephrasing the question: why OS memory layout and OS behavior is a > property of hardware (DTS)? I would say the premise is fundamentally the same as the existing reserved-memory child node. I've been rethinking how this should be specified. I am now thinking that it may be better to introduce a new Reserved Memory property that serves as a modifier to the 'reusable' property. The 'reusable' property allows the OS to use memory that has been reserved for a device and therefore requires the device driver to reclaim the memory prior to its use. However, an OS may have multiple ways of implementing such reuse and reclamation. I am considering introducing the vendor specific 'linux,dmb' property that is dependent on the 'reusable' property to allow both the OS and the device driver to identify the method used by the Linux OS to support reuse and reclamation of the reserved-memory child node. Such a property would remove any need for new compatible strings to the device tree. Does that approach seem reasonable to you? > > Best regards, > Krzysztof Thanks again for taking the time, -Doug