Re: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Yes, the search engines helped[1]. I run a minimal system, so when I
> > mount cpusets, it will actually mount cgroups with a default mount
> > option of "noprefix". But you likely run a rootfs with cgroups already,
> > so it gets mounted directly without "noprefix". Then, when the logic
> > analyzer tries to mount again, the implied default "noprefix" is
> > discarded.
> 
> Yeah, systemd on Debian has it mounted.

So, the proper solution is to use/mount 'cgroups2' instead of 'cpuset'.
But this needs more thinking and testing and, thus, another revision.
Dunno if I can make it this year, so I am probably going to miss the
next merge window after all :(

Geert, if you still want to test the PFC patch I sent, then this patch
for the script should get you going:

diff --git a/tools/gpio/gpio-sloppy-logic-analyzer b/tools/gpio/gpio-sloppy-logic-analyzer
index eb2065fe6733..f1bfdd3568cf 100755
--- a/tools/gpio/gpio-sloppy-logic-analyzer
+++ b/tools/gpio/gpio-sloppy-logic-analyzer
@@ -80,13 +80,13 @@ init_cpu()
 	mount | grep -q $cpusetdir || mount -t cpuset cpuset $cpusetdir
 	[ -d "$lacpusetdir" ] || mkdir "$lacpusetdir"
 
-	cur_cpu="$(cat "$lacpusetdir"/cpus)"
+	cur_cpu="$(cat "$lacpusetdir"/cpuset.cpus)"
 	[ "$cur_cpu" = "$isol_cpu" ] && return
 	[ -z "$cur_cpu" ] || fail "CPU$isol_cpu requested but CPU$cur_cpu already isolated"
 
-	echo "$isol_cpu" > "$lacpusetdir"/cpus || fail "Could not isolate CPU$isol_cpu. Does it exist?"
-	echo 1 > "$lacpusetdir"/cpu_exclusive
-	echo 0 > "$lacpusetdir"/mems
+	echo "$isol_cpu" > "$lacpusetdir"/cpuset.cpus || fail "Could not isolate CPU$isol_cpu. Does it exist?"
+	echo 1 > "$lacpusetdir"/cpuset.cpu_exclusive
+	echo 0 > "$lacpusetdir"/cpuset.mems
 
 	oldmask=$(cat /proc/irq/default_smp_affinity)
 	newmask=$(printf "%x" $((0x$oldmask & ~(1 << isol_cpu))))
@@ -213,7 +213,7 @@ if [ -n "$triggerdat" ]; then
 	printf "$trigger_bindat" > "$lasysfsdir"/trigger 2>/dev/null || fail "Trigger data '$triggerdat' rejected"
 fi
 
-workcpu=$(cat "$lacpusetdir"/effective_cpus)
+workcpu=$(cat "$lacpusetdir"/cpuset.effective_cpus)
 [ -n "$workcpu" ] || fail "No isolated CPU found"
 cpumask=$(printf '%x' $((1 << workcpu)))
 instance=${lasysfsdir##*/}

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux