* cpu4096 + smp_affinity breakage
@ 2008-07-29 14:34 Jiri Slaby
2008-07-29 15:03 ` Mike Travis
2008-07-29 15:05 ` Alexey Dobriyan
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2008-07-29 14:34 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Mike Travis, Linux kernel mailing list
Hi,
I see cpu4096 branches in -tip. Do you know about /proc/irq/*/*smp_affinity
(irq_affinity_read_proc, default_affinity_read) breakage with NR_CPUS=4096?
Reading by `cat' from those files fails due to bitmap sent out is about 1150
bytes, but cat provides only 1024B sized buffer. Can you think about any fix
for this?
Using file offset and utilize only portion of that buffer returned to the
userspace will break atomicity I guess (does this matter?). If we get a
snapshot, it would get old if some reader breaks up. And if we use
per-reader buffer, we will be unable to free it. Any ideas?
I think the same problem is for not-at-once-writes.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cpu4096 + smp_affinity breakage
2008-07-29 14:34 cpu4096 + smp_affinity breakage Jiri Slaby
@ 2008-07-29 15:03 ` Mike Travis
2008-07-29 15:05 ` Alexey Dobriyan
1 sibling, 0 replies; 3+ messages in thread
From: Mike Travis @ 2008-07-29 15:03 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Ingo Molnar, Linux kernel mailing list
Jiri Slaby wrote:
> Hi,
>
> I see cpu4096 branches in -tip. Do you know about
> /proc/irq/*/*smp_affinity (irq_affinity_read_proc,
> default_affinity_read) breakage with NR_CPUS=4096? Reading by `cat' from
> those files fails due to bitmap sent out is about 1150 bytes, but cat
> provides only 1024B sized buffer. Can you think about any fix for this?
>
> Using file offset and utilize only portion of that buffer returned to
> the userspace will break atomicity I guess (does this matter?). If we
> get a snapshot, it would get old if some reader breaks up. And if we use
> per-reader buffer, we will be unable to free it. Any ideas?
>
> I think the same problem is for not-at-once-writes.
The best alternate is to use cpulist_scnprintf but even this has
problems in the worst pathological case (where you want every other
cpu listed, e.g. only one of the two hyper threads). Another alternate
would be to send only nr_cpu_ids mask bits [with obviously some way
for the user to discover what nr_cpu_ids is.]
There was strong objections to changing any of the /sys interfaces, but
I don't know what the rules are for the /proc interfaces. And (iirc),
overflow was the user's responsibility. How about using "dd bs=4k ..."?
Thanks,
Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cpu4096 + smp_affinity breakage
2008-07-29 14:34 cpu4096 + smp_affinity breakage Jiri Slaby
2008-07-29 15:03 ` Mike Travis
@ 2008-07-29 15:05 ` Alexey Dobriyan
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2008-07-29 15:05 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Ingo Molnar, Mike Travis, Linux kernel mailing list
On Tue, Jul 29, 2008 at 04:34:13PM +0200, Jiri Slaby wrote:
> I see cpu4096 branches in -tip. Do you know about /proc/irq/*/*smp_affinity
> (irq_affinity_read_proc, default_affinity_read) breakage with NR_CPUS=4096?
> Reading by `cat' from those files fails due to bitmap sent out is about
> 1150 bytes, but cat provides only 1024B sized buffer. Can you think about
> any fix for this?
>
> Using file offset and utilize only portion of that buffer returned to the
> userspace will break atomicity I guess (does this matter?). If we get a
> snapshot, it would get old if some reader breaks up. And if we use
> per-reader buffer, we will be unable to free it. Any ideas?
>
> I think the same problem is for not-at-once-writes.
Time to ressurect my smp_affinity-as-seq-file patch which was dropped
for a stupid reason.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-29 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 14:34 cpu4096 + smp_affinity breakage Jiri Slaby
2008-07-29 15:03 ` Mike Travis
2008-07-29 15:05 ` Alexey Dobriyan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.