[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36ca99e90804090853xf62438ayfbfa6010f2d31747@mail.gmail.com>
Date: Wed, 9 Apr 2008 17:53:38 +0200
From: "Bert Wesarg" <bert.wesarg@...glemail.com>
To: "Mike Travis" <travis@....com>
Cc: "Ingo Molnar" <mingo@...e.hu>, "Paul Jackson" <pj@....com>,
"Thomas Gleixner" <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] cpumask: use new cpus_scnprintf function v3
On Tue, Apr 8, 2008 at 10:46 PM, Mike Travis <travis@....com> wrote:
>
> Bert Wesarg wrote:
> > On Tue, Apr 8, 2008 at 8:43 PM, Mike Travis <travis@....com> wrote:
> >> --- linux-2.6.x86.sched.orig/drivers/base/node.c
> >> +++ linux-2.6.x86.sched/drivers/base/node.c
> >> @@ -19,22 +19,34 @@ static struct sysdev_class node_class =
> >> };
> >>
> >>
> >> -static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
> >> +static ssize_t node_read_cpumap(struct sys_device *dev, int type, char *buf)
> >> {
> >> struct node *node_dev = to_node(dev);
> >> node_to_cpumask_ptr(mask, node_dev->sysdev.id);
> >> int len;
> >>
> >> - /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
> >> - BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
> >> + /* 2008/04/07: buf currently PAGE_SIZE, need 9 chars per 32 bits. */
> >> + BUILD_BUG_ON((NR_CPUS/32 * 9) > (PAGE_SIZE-1));
> > Is this right, that you switch from MAX_NUMNODES to NR_CPUS?
> >
> > Regards
> > Bert
>
> It's printing the number of cpus on a node, so the number of nodes is not
> important, it's how many cpus can fit on the head of a node... ;-)
Ahh, the old code was Just Plain Wrong.
Thanks.
Bert
>
> Thanks,
> Mike
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists