Looks fine with me. It doesn't break anything. Go ahead.
Moshe
On Mar 18, 2004, at 11:53 AM, Jason Ferrara wrote:
> If you apply a new configuration to openmosix that has less nodes that
> the old
> configuration, the system will often die with "panic: nth_node".
>
> In config_reduce_to_common(), the current configuration is changed,
> but not the
> NPE and MAXPE variables. This would make inform() pick a node that
> doesn't exist,
> and boom.
>
> Anyone mind if I commit this patch to cvs?
>
> Index: linux-openmosix/hpc/config.c
> ===================================================================
> RCS file:
> /cvsroot/openmosix/linux-openmosix/linux-openmosix/hpc/config.c,v
> retrieving revision 1.5
> diff -u -r1.5 config.c
> --- linux-openmosix/hpc/config.c 10 Nov 2002 08:53:06 -0000
> 1.5
> +++ linux-openmosix/hpc/config.c 18 Mar 2004 19:31:02 -0000
> @@ -709,8 +709,12 @@
> struct mosixnet *mt, *svmton;
> int svnmton;
> int error;
> -
> -
> + int newmaxpe=0;
> + int newnumpe=0;
> + int i;
> + int svnumpe;
> + int svmaxpe;
> +
> switch (comm_type) {
> case AF_INET:
> mt = ip_reduce_to_common(nm, &nmn);
> @@ -725,11 +729,21 @@
> if (!mt)
> return (-ENOMEM);
>
> + for(svmton = mt, i = 0; i < nmn; i++, svmton++)
> + {
> + newnumpe += svmton->cnt;
> + if (svmton->base + svmton->cnt - 1 > newmaxpe)
> + newmaxpe = svmton->base + svmton->cnt - 1;
> + }
> svmton = mosnet;
> svnmton = nmosnet;
> + svnumpe = NPE;
> + svmaxpe = MAXPE;
> lock_mosix();
> mosnet = mt;
> nmosnet = nmn;
> + NPE = newnumpe;
> + MAXPE = newmaxpe;
> unlock_mosix();
>
>
> @@ -739,6 +753,8 @@
> lock_mosix();
> mosnet = svmton;
> nmosnet = svnmton;
> + NPE = svnumpe;
> + MAXPE = svmaxpe;
> unlock_mosix();
> kfree(mt);
> return (error);
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Openmosix-devel mailing list
> Openmosix-devel@...
> https://lists.sourceforge.net/lists/listinfo/openmosix-devel
>
|