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 8ED81C54EE9 for ; Mon, 19 Sep 2022 11:03:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BA4686B0072; Mon, 19 Sep 2022 07:03:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B2CC76B0073; Mon, 19 Sep 2022 07:03:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A5FC940007; Mon, 19 Sep 2022 07:03:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 89C866B0072 for ; Mon, 19 Sep 2022 07:03:51 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6C41F1C5D71 for ; Mon, 19 Sep 2022 11:03:51 +0000 (UTC) X-FDA: 79928549862.16.BD58CA0 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by imf18.hostedemail.com (Postfix) with ESMTP id 18E841C0006 for ; Mon, 19 Sep 2022 11:03:49 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id b24so3497464ljk.6 for ; Mon, 19 Sep 2022 04:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=TcbEHO2M1Vn7869vpthKt1PADnZwIS+iJq0ZGvm2ISU=; b=eCgAMNR0/oNYqUNLjWGvDumqw2QiynIm6mZWzzKGu8A6nUQFWlfAojCCn04+7s1PNP kFrK/0r9SLLWN+D5XksTCe3ZX1uhmpZuNKZa7bwM2kNFWt5qS5PiZGcTlY1XhJreiw5P SJJLfgaolJXDlxo2Fz2pOMASibdZJRfJG/8pI0uiUlmdXAboZigmyqe236MZC/Blduvn v8j4HXPXFi2tea2082grXHIvE8p2hzHgYBEffBpWASuaD9gIuEORS8QeKe25TzYYL9A1 ut5w945Z/HWY+KpJdbSFHFK7cFwvpTKadENcsO68367MD0bQYhrS1FADSoVFVXiwv5Wa FNLQ== 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=TcbEHO2M1Vn7869vpthKt1PADnZwIS+iJq0ZGvm2ISU=; b=3SsuU/It6qC2oWyyFiGmMZAoVXP/lPVcfDjQsazVFgbD1xNYJBQnRE4QQF9MXCaKLZ NziyIC0qLZruEcE8jlrbBDq8gACxLZoKwZ1gxP/G4x/dS/ug2Tx0wW5sFtEXlJqQ+Oxq aqzp/OI/EIhSYmc+vsUGShF/JZccG6HfApZ5q7R2gr6pijSoQusNF81/FbZkvowgiYYw YQNXLAKp+bSUk+DcP9NfRYlDhcDNVJ1lsE2jkQa8EAhNRh1+ZWjh/ov+UPEChX6OH7yx m+6p+KklkPKNUMCKkdUaVPSRz5rPObQ7EFbPxaJ7/ZcHhO1J+ksJs3HGrjyJ9gcpwvcz honQ== X-Gm-Message-State: ACrzQf0Eo1HDSBMqbQtNvJgjk+M90cZ6JyUr5J8+/dAQPe5l5pCG1Vl4 cEoY+U4+TQEjpj5upSZINn+fbg== X-Google-Smtp-Source: AMsMyM6ehRBDTKsqy6n6LtYJaToBW7Kz4lBTJZvNjeGA2Sv6mgDRd/UJeVtCu0piJ8hcO0aLPDOfew== X-Received: by 2002:a2e:9608:0:b0:26a:a73b:b8c1 with SMTP id v8-20020a2e9608000000b0026aa73bb8c1mr5203413ljh.328.1663585428366; Mon, 19 Sep 2022 04:03:48 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id s2-20020a056512314200b0048b08e25979sm5132313lfi.199.2022.09.19.04.03.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 04:03:47 -0700 (PDT) Message-ID: Date: Mon, 19 Sep 2022 13:03:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 16/21] dt-bindings: reserved-memory: introduce designated-movable-block Content-Language: en-US To: Doug Berger , 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: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663585430; a=rsa-sha256; cv=none; b=y3N4ClB2r3KRbsoLukC2TDUvBGDrfoSdL8vX3nrV4dLyNxi665WTPrkp+lU7+VJJ7Oqv4P kwsTOE5sKPFzHHbx4ixzSiXURgjFsebp3ullGXc5PL0BEfnjMgj7RRHdjD4chtzaB802e4 cS6w0RQfCnI25YbN54oIN2I36y7asOE= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=eCgAMNR0; spf=pass (imf18.hostedemail.com: domain of krzysztof.kozlowski@linaro.org designates 209.85.208.170 as permitted sender) smtp.mailfrom=krzysztof.kozlowski@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663585430; 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=TcbEHO2M1Vn7869vpthKt1PADnZwIS+iJq0ZGvm2ISU=; b=7vXFwP2W26Tb01d4aCI2lR9z3jIjZ5vrqToNGy0lCYBSARcI1V07RYhB6aarfNn4NcthWr uG4sVhNCwbewFjv+YJYFr5QdnCm0bOVZ2zOLRCH3Yy4eiPNaEPX9D3XZSWqKmaydcSSKKE i8tOXL0Hv9RNEsf0y5d3xR66eDVUHPg= X-Rspamd-Queue-Id: 18E841C0006 X-Rspamd-Server: rspam05 X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=eCgAMNR0; spf=pass (imf18.hostedemail.com: domain of krzysztof.kozlowski@linaro.org designates 209.85.208.170 as permitted sender) smtp.mailfrom=krzysztof.kozlowski@linaro.org; dmarc=pass (policy=none) header.from=linaro.org X-Stat-Signature: keh3sq7qm4teionfujh14zi11z86i5ec X-HE-Tag: 1663585429-444637 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 19/09/2022 01:12, Doug Berger wrote: > 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 don't think it is fundamentally the same. The existing reserved-memory node describes memory used by hardware - by other devices. The OS way of handling this memory - movable, reclaimable etc - is not part of it. So no, it is not the same. > > 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. ... and I repeat the question - why OS way of implementing reuse and reclamation is relevant to DT? > 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. Sure, but why? Why OS and Linux driver specific pieces should be in DT? > Such a property would remove any need for new compatible strings to the > device tree. Does that approach seem reasonable to you? No, because you did not explain original question. At all. Best regards, Krzysztof