Re: [PATCH] cpumask: fix lg_lock/br_lock.

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

 



* Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx> wrote:

> We wanted to avoid doing for_each_possible_cpu() to avoid the 
> unnecessary performance hit. [...]

That was done at the cost of making the code rather complex.

The thing is, *ANY* cpu-mask loop is an utter slowpath, so the 
"performance hit" is an overstatement. There's already dozens of 
of for_each_possible_cpu() loops in the kernel, and it's a 
perfectly acceptable solution in such cases.

I suspect it does not matter much now as the code appears to be 
correct, but in general we want to opt for simpler designs for 
rare and fragile codepaths.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux