Re: [PATCH 0/3] x86: add cpus_scnprintf function v3

From: Bert Wesarg
Date: Wed Apr 09 2008 - 17:21:34 EST


On Wed, Apr 9, 2008 at 11:14 PM, Greg KH <gregkh@xxxxxxx> wrote:
>
> On Wed, Apr 09, 2008 at 10:52:58PM +0200, Bert Wesarg wrote:
> > On Wed, Apr 9, 2008 at 10:39 PM, Greg KH <gregkh@xxxxxxx> wrote:
> > >
> > > On Wed, Apr 09, 2008 at 07:51:23PM +0200, Bert Wesarg wrote:
> > > > On Tue, Apr 8, 2008 at 8:43 PM, Mike Travis <travis@xxxxxxx> wrote:
> > > > > * Cleanup usages of cpumask_scprintf in the following files and add
> > > > > another interface to use cpulist_scnprintf where appropriate.
> > > >
> > > > On Mon, Apr 7, 2008 at 8:22 PM, Mike Travis <travis@xxxxxxx> wrote:
> > > > > Part of the change is readability, but also looking towards the future
> > > > > of 16k/64k/??? # of cpus, the straight mask approach will overflow the
> > > > > PAGE_SIZE buffer provided (though some pathological cases will overflow
> > > > > the range method as well.) So we'll need some advancement in the format
> > > > > of the printout.
> > > >
> > > > Btw, I think you can now push for a deprecation of the 'old' mask
> > > > attributes, with the justification you have given above. The other
> > > > possibility is to change sysfs to provide bigger attribute buffers
> > > > (CCed Greg for this).
> > >
> > > Huh?
> > >
> > > sysfs is "one value per file", if you are getting close to PAGE_SIZE in
> > > any sysfs file, then you are doing something very wrong.
> > >
> > > What sysfs file currently is trying to output data this big?
> > Currently none. But if NR_CPUS >= 16K and PAGE_SIZE == 4K, than any
> > file with an cpumask_scnprintf().
>
> Do we have such sysfs files today?
Files with cpumask_scnprintf()? Sure, the cpu topology exports plenty
of cpu masks.

If you ask for files with that big NR_CPUS, than no. We are talking
only for future scenarios.

Bert
>
> thanks,
>
> greg k-h
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/