[OpenAFS-devel] [REVIEW] Can haz Solaris 10 8/07 compatibility patch

Derrick Brashear shadow@gmail.com
Wed, 26 Sep 2007 21:47:29 -0400


------=_Part_3543_5166341.1190857649150
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

seems like you could macroize or better yet functionize the loop:

+    (void) rw_enter(&afsifinfo_lock, RW_READER);
+
+    for (i = 0; afsifinfo[i].ipaddr != NULL; i++) {

...
rw_exit()


?




On 9/26/07, Dale Ghent <daleg@umbc.edu> wrote:
>
>
> Here's a candidate patch for those of you running any version of
> Solaris 10, or have hopes of running OpenAFS on Solaris 10 8/07
> (update 4);
>
> This patch removes use of the non-Public ILL structures by OpenAFS to
> gather network interface information in order to make RX packet size
> and server locality decisions. I replaced it with a Solaris taskq(9f)
> that executes a function which polls the network interfaces on the
> machine and populates a global array with collected information.
> Network information consumers then walk this array to gain the info
> they require. This polling function, by default, runs every 30 seconds.
>
> I made a design change from previous versions in that I dispensed
> with the while(1) loop for the polling mechanism. The osi_NetIfPoller
> function now chains itself.
>
> The interval between polls may be adjusted either by /etc/system or
> in real time by the use of mdb:
>
> Set afs interface poll interval to 15 seconds using /etc/system:
>      set afs:afs_if_poll_interval=15
>
> Get current poll interval using mdb:
>      # echo afs_if_poll_interval/D | mdb -k
>      afs_if_poll_interval:
>      afs_if_poll_interval:           30
>
> Set a new poll interval to 15 seconds (in hex):
>      # echo "afs_if_poll_interval/W 0f" | mdb -kw
>      afs_if_poll_interval:           0x1e            =       0xf
>
> You may see if the poller is doing its job by watching the "executed"
> line of the  afs_taskq kstat:
>      # kstat -n afs_taskq
>      module: unix                            instance: 0
>      name:   afs_taskq                       class:    taskq
>              crtime                          141.142208577
>              executed                        126
>              maxtasks                        1
>              nactive                         2
>              nalloc                          0
>              priority                        60
>              snaptime                        2286.25972396
>              tasks                           126
>              threads                         2
>              totaltime                       28790720
>
> The following patch applies against OpenAFS 1.4.4. I urge that it be
> tested on any version of Solaris that you may have at your disposal,
> not just 10u4. Please discuss any issues on the -devel list.
>
> http://elektronkind.org/outbox/afs/openafs-s10u4-compat.patch
>
> /dale
> --
> Dale Ghent
> Specialist, Storage and UNIX Systems
> UMBC - Office of Information Technology
> ECS 201 - x51705
>
>
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>

------=_Part_3543_5166341.1190857649150
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<pre>seems like you could macroize or better yet functionize the loop:<br><=
br>+    (void) rw_enter(&amp;afsifinfo_lock, RW_READER);<br>+<br>+    for (=
i =3D 0; afsifinfo[i].ipaddr !=3D NULL; i++) {</pre>...<br>rw_exit()<br><br=
>
<br>?<br><br><br><br><br><div><span class=3D"gmail_quote">On 9/26/07, <b cl=
ass=3D"gmail_sendername">Dale Ghent</b> &lt;<a href=3D"mailto:daleg@umbc.ed=
u">daleg@umbc.edu</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" st=
yle=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex=
; padding-left: 1ex;">
<br>Here&#39;s a candidate patch for those of you running any version of<br=
>Solaris 10, or have hopes of running OpenAFS on Solaris 10 8/07<br>(update=
 4);<br><br>This patch removes use of the non-Public ILL structures by Open=
AFS to
<br>gather network interface information in order to make RX packet size<br=
>and server locality decisions. I replaced it with a Solaris taskq(9f)<br>t=
hat executes a function which polls the network interfaces on the<br>machin=
e and populates a global array with collected information.
<br>Network information consumers then walk this array to gain the info<br>=
they require. This polling function, by default, runs every 30 seconds.<br>=
<br>I made a design change from previous versions in that I dispensed<br>
with the while(1) loop for the polling mechanism. The osi_NetIfPoller<br>fu=
nction now chains itself.<br><br>The interval between polls may be adjusted=
 either by /etc/system or<br>in real time by the use of mdb:<br><br>Set afs=
 interface poll interval to 15 seconds using /etc/system:
<br>&nbsp;&nbsp;&nbsp;&nbsp; set afs:afs_if_poll_interval=3D15<br><br>Get c=
urrent poll interval using mdb:<br>&nbsp;&nbsp;&nbsp;&nbsp; # echo afs_if_p=
oll_interval/D | mdb -k<br>&nbsp;&nbsp;&nbsp;&nbsp; afs_if_poll_interval:<b=
r>&nbsp;&nbsp;&nbsp;&nbsp; afs_if_poll_interval:&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30<br><br>Set a new poll interval to 15 s=
econds (in hex):
<br>&nbsp;&nbsp;&nbsp;&nbsp; # echo &quot;afs_if_poll_interval/W 0f&quot; |=
 mdb -kw<br>&nbsp;&nbsp;&nbsp;&nbsp; afs_if_poll_interval:&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1e&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=3D&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; 0xf<br><br>You may see if the poller is doing its job by watching=
 the &quot;executed&quot;<br>
line of the&nbsp;&nbsp;afs_taskq kstat:<br>&nbsp;&nbsp;&nbsp;&nbsp; # kstat=
 -n afs_taskq<br>&nbsp;&nbsp;&nbsp;&nbsp; module: unix&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ins=
tance: 0<br>&nbsp;&nbsp;&nbsp;&nbsp; name:&nbsp;&nbsp; afs_taskq&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&n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
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; totaltime&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28790720
<br><br>The following patch applies against OpenAFS 1.4.4. I urge that it b=
e<br>tested on any version of Solaris that you may have at your disposal,<b=
r>not just 10u4. Please discuss any issues on the -devel list.<br><br><a hr=
ef=3D"http://elektronkind.org/outbox/afs/openafs-s10u4-compat.patch">
http://elektronkind.org/outbox/afs/openafs-s10u4-compat.patch</a><br><br>/d=
ale<br>--<br>Dale Ghent<br>Specialist, Storage and UNIX Systems<br>UMBC - O=
ffice of Information Technology<br>ECS 201 - x51705<br><br><br><br>________=
_______________________________________
<br>OpenAFS-devel mailing list<br><a href=3D"mailto:OpenAFS-devel@openafs.o=
rg">OpenAFS-devel@openafs.org</a><br><a href=3D"https://lists.openafs.org/m=
ailman/listinfo/openafs-devel">https://lists.openafs.org/mailman/listinfo/o=
penafs-devel
</a><br></blockquote></div><br>

------=_Part_3543_5166341.1190857649150--