Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2369320rwb; Mon, 19 Sep 2022 04:14:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46Kh2e6sh+xUpF8B9bLFlKeVZIKu6SbPCYDT7G3jAeROtlIQFdv18cngupLhZvWhAj/IhE X-Received: by 2002:a17:906:fd86:b0:777:d739:1ede with SMTP id xa6-20020a170906fd8600b00777d7391edemr12010120ejb.576.1663586069546; Mon, 19 Sep 2022 04:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663586069; cv=none; d=google.com; s=arc-20160816; b=YQclVg/2Ucw26g3NGpy3JMHPCaObj6lTkCDSMHoTgx4x6gefaeuRS1YUI7t0/aYArA nQdrlg4S17aKPKx1IoLVN3eYmYEhVDNV78MR2hxED35b0lVbX/r5Om0YtghTYNWi/uvy FB1G4wcwlrqTqUt7Vi3KetGSzHcSV4tLND45nrhRnIh6P4Jj2481TAwEsWN2tUmGQxNX fPeJI6sMK3+/hvlSvpL9pG94Wp5h1Yi+QmF1yJlVgD9tAMEQS4dkaRuq+DMMqZ7a71F0 iT5D9d9d1c4xeh6frURkBuicUYNxYuyAvcyi5RmSKNMAwxk8J4m4rbUsDnZPrEmsPzMx fOmQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TcbEHO2M1Vn7869vpthKt1PADnZwIS+iJq0ZGvm2ISU=; b=V+3ovr6lkk35eULDyPAv3G5RQPio/1d+vS6Taju6k/J6CXbYc0mnwQZyrWGeoG7Bt0 gVYi3GfzwMyArr09ri21NNSZB78RTO43AF0BYyGT49+EaplAu0BVSkmfjXSmzCYChZPr AxKpBj8HhyjWjr393QZToH8wKXSmPtXL07qDzXlcXQBCRj2/0ZFRmvsyNRxIgo+NnPhk sOKGaSMQABaMhdV2e3yvZHWIgaje1UYQ+zh43cUrkQtwiIcZo8hRJvzoZBIQ+AVs3sMd ZaU0oxxK17k8jVUdpD275MG/i9dV02aUnzQGn8YeeWqqKTVF1FfXFl3tmEz6Od3XXY3w 0+jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eCgAMNR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb31-20020a1709076d9f00b0077f2c582561si22777962ejc.156.2022.09.19.04.14.03; Mon, 19 Sep 2022 04:14:29 -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; dkim=pass header.i=@linaro.org header.s=google header.b=eCgAMNR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbiISLD7 (ORCPT + 99 others); Mon, 19 Sep 2022 07:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbiISLDw (ORCPT ); Mon, 19 Sep 2022 07:03:52 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A01DB6 for ; Mon, 19 Sep 2022 04:03:50 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id p5so33371137ljc.13 for ; Mon, 19 Sep 2022 04:03:50 -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=glQpzay34zQIL0KemZJXiPI86iTLrj36YU6LTZOYH/g8EmgJpjp+U0rifHmFohVrYI WJp0Nzc0nkByp4wloCt63o+uPFihXpmxPkw8n8yRAtk+x7TPShcwyidFOWPf67mbmxa5 P/KI0oc028KDuZOj0n+Te+3VvKX4BF2Ldz6kW2VFpkNXhkmyyl+c8wqLmUHBXmEm0vVe KQxncnqVPNpQITuIwU+9qr5/Vf8ygaoBzjl1rSY1KvjIvqv20YC7VHBj+Gg3YfCwfDgp 9k5GKGM/3XMyGAYXIC/1H5nJ3J545lRXW+4crhQ4d4sTMwvUV9kn7fXPdTCr1TV8GS8W JczA== X-Gm-Message-State: ACrzQf11TbYFjW4LZvq9byPYwhaD+mveoXWou2k1BbhYuqBsI4ILX+SR Ph6Zmul7xR/1vo9jzSvMmbai9g== 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 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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