<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:20:40 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-8802] Dynamically allocate obd_devices.</title>
                <link>https://jira.whamcloud.com/browse/LU-8802</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;One proposed cleanup upstream was removal of &lt;tt&gt;class_devno_max()&lt;/tt&gt;. It was pointed out that was for future work to enable dynamic obd_device allocation.&lt;br/&gt;
Aya Mahfouz has stepped forward wanting to do this work. Created this ticket to keep track of the progress and have reviewers look over his work.&lt;/p&gt;

&lt;p&gt;Andreas replied to Aya&apos;s email with the following suggestions:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are several ways to approach this problem to make the allocation of the &lt;tt&gt;obd_devs[]&lt;/tt&gt; array dynamic.  In most cases, there isn&apos;t any value to dynamically shrink this array, since the filesystem(s) will typically be mounted until the node is rebooted, and it is only in the tens of KB size range, so this will not affect ongoing operations, and that simplifies the implementation.&lt;/p&gt;

&lt;p&gt;The easiest way would be to have a dynamically-sized &lt;tt&gt;obd_devs[]&lt;/tt&gt; array that is reallocated in &lt;tt&gt;class_newdev()&lt;/tt&gt; in &lt;tt&gt;PAGE_SIZE&lt;/tt&gt; chunks whenever the current array has no more free slots and copied to the new array, using &lt;tt&gt;obd_dev_lock&lt;/tt&gt; to protect the array while it is being reallocated and copied.  In most cases, this would save memory over the static array (not many filesystems have so many servers), but for the few sites that have 10000+ servers, and/or mounting multiple large filesystems on a single node, they don&apos;t need to change the source to handle this.  Using &lt;tt&gt;libcfs_kvzalloc()&lt;/tt&gt; would avoid issues with allocating large chunks of memory.&lt;/p&gt;

&lt;p&gt;There are a few places where &lt;tt&gt;obd_devs[]&lt;/tt&gt; is accessed outside &lt;tt&gt;obd_dev_lock&lt;/tt&gt; that would need to be fixed now that this array may be changed at runtime.&lt;/p&gt;

&lt;p&gt;A second approach that may scale better is to change &lt;tt&gt;obd_devs&lt;/tt&gt; from an array to a doubly linked list (using standard &lt;tt&gt;list_head&lt;/tt&gt; helpers).  In many cases the whole list is seached linearly in the cases where a hash table lookup for the device name/UUID is not used, and most of the uses of &lt;tt&gt;class_num2obd()&lt;/tt&gt; are just used to walk that list in order, which could be replaced with &lt;tt&gt;list_for_each_entry()&lt;/tt&gt; list traversal.  The &lt;tt&gt;class_name2dev()&lt;/tt&gt; function should be changed to return the pointer to &lt;tt&gt;struct obd_device&lt;/tt&gt;, and a new helper &lt;tt&gt;class_dev2num()&lt;/tt&gt; would just return the &lt;tt&gt;obd_minor&lt;/tt&gt; number from &lt;tt&gt;struct obd_device&lt;/tt&gt; for the one use in &lt;tt&gt;class_resolve_dev_name()&lt;/tt&gt;.  Using a linked list has the advantage that there is no need to search for free slots in the array, since devices would be removed from the list when it is freed.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="41336">LU-8802</key>
            <summary>Dynamically allocate obd_devices.</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="simmonsja">James A Simmons</assignee>
                                    <reporter username="simmonsja">James A Simmons</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Nov 2016 04:18:08 +0000</created>
                <updated>Mon, 22 Jan 2024 15:43:32 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="172569" author="pjones" created="Mon, 7 Nov 2016 18:04:37 +0000"  >&lt;p&gt;James &lt;/p&gt;

&lt;p&gt;It probably makes sense fpr you to own this ticket as you will likely be reviewing it when ready&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="280210" author="adilger" created="Tue, 22 Sep 2020 03:36:35 +0000"  >&lt;p&gt;The patch &lt;a href=&quot;https://review.whamcloud.com/347&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/347&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-147&quot; title=&quot;avoid 8k obd device amount limit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-147&quot;&gt;&lt;del&gt;LU-147&lt;/del&gt;&lt;/a&gt; avoid 8k obd device amount limit&lt;/tt&gt;&quot; used a different mechanism to remove this limit, but had to be reverted due to defects.  It would probably be useful to review, even if the final approach is different.&lt;/p&gt;</comment>
                            <comment id="358863" author="adilger" created="Thu, 12 Jan 2023 21:03:01 +0000"  >&lt;p&gt;It turns out that containers/VMs on clients like to mount the same filesystems many times, so that may drive some interest in reviving this work, instead of the need to support a single 10000-OST filesystem mount.  &lt;/p&gt;</comment>
                            <comment id="372602" author="gerrit" created="Wed, 17 May 2023 16:46:53 +0000"  >&lt;p&gt;&quot;Timothy Day &amp;lt;timday@amazon.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51040&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51040&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: remove MAX_OBD_DEVICES&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: eead8e7f0d6830d5a63d59541888ec8d20b5e2fb&lt;/p&gt;</comment>
                            <comment id="382045" author="gerrit" created="Thu, 10 Aug 2023 19:10:32 +0000"  >&lt;p&gt;&quot;Timothy Day &amp;lt;timday@amazon.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51920&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51920&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: add strong locking to OBD lifecycle management&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 73c2c71a49c9e079dfa0273256d34e83ba18651f&lt;/p&gt;</comment>
                            <comment id="390578" author="gerrit" created="Wed, 25 Oct 2023 18:05:28 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51040/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51040/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: remove MAX_OBD_DEVICES&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c5e5060d9502c2e4fb43579d02c983ccbec9b063&lt;/p&gt;</comment>
                            <comment id="396868" author="gerrit" created="Thu, 14 Dec 2023 16:37:15 +0000"  >&lt;p&gt;&quot;Timothy Day &amp;lt;timday@amazon.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53466&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53466&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: str2dev is missing obd_device_unlock()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a88d2e89de0737e56bb1ff03d368f3f7838b0ffd&lt;/p&gt;</comment>
                            <comment id="398374" author="gerrit" created="Wed, 3 Jan 2024 03:04:01 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53466/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53466/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: str2dev is missing obd_device_unlock()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c68fce096fc1eadfb6186f57e4c3b2b239392c6e&lt;/p&gt;</comment>
                            <comment id="398766" author="gerrit" created="Sun, 7 Jan 2024 01:54:24 +0000"  >&lt;p&gt;&quot;Timothy Day &amp;lt;timday@amazon.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53606&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53606&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8802&quot; title=&quot;Dynamically allocate obd_devices.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8802&quot;&gt;LU-8802&lt;/a&gt; obd: add uuid and name hash tables&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: bdeb4a5ce22e4d91e978d128ea328f21acaa2185&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="10477">LU-147</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzyumf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>