Date: Mon, 30 Jun 2014 23:18:55 +0000 From: "Rang, Anton" <anton.rang@isilon.com> To: Konstantin Belousov <kostikbel@gmail.com>, "performance@freebsd.org" <performance@freebsd.org> Cc: "current@freebsd.org" <current@freebsd.org> Subject: RE: PostgreSQL performance on FreeBSD Message-ID: <F21EDC44C64DB34B90AF485AC3CEDD4B353982C1@MX104CL01.corp.emc.com> In-Reply-To: <20140627125613.GT93733@kib.kiev.ua> References: <20140627125613.GT93733@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for this. The cpu_search problem you reference came up here at Isilon as well. Here'= s a patch which should get clang to do the "right thing" (inlining 3 specia= lized copies of cpu_search); I haven't checked to make sure it doesn't hurt= gcc, though. Anton Index: sched_ule.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sched_ule.c (revision 268043) +++ sched_ule.c (working copy) @@ -622,11 +622,11 @@ for ((cpu) =3D 0; (cpu) <=3D mp_maxid; (cpu)++) \ if (CPU_ISSET(cpu, &mask)) =20 -static __inline int cpu_search(const struct cpu_group *cg, struct cpu_sear= ch *low, +static __always_inline int cpu_search(const struct cpu_group *cg, struct c= pu_search *low, struct cpu_search *high, const int match); -int cpu_search_lowest(const struct cpu_group *cg, struct cpu_search *low); -int cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high= ); -int cpu_search_both(const struct cpu_group *cg, struct cpu_search *low, +int __noinline cpu_search_lowest(const struct cpu_group *cg, struct cpu_se= arch *low); +int __noinline cpu_search_highest(const struct cpu_group *cg, struct cpu_s= earch *high); +int __noinline cpu_search_both(const struct cpu_group *cg, struct cpu_sear= ch *low, struct cpu_search *high); =20 /* @@ -640,7 +640,7 @@ * match argument. It is reduced to the minimum set for each case. It is * also recursive to the depth of the tree. */ -static __inline int +static __always_inline int cpu_search(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match) { -----Original Message----- From: owner-freebsd-current@freebsd.org [mailto:owner-freebsd-current@freeb= sd.org] On Behalf Of Konstantin Belousov Sent: Friday, June 27, 2014 7:56 AM To: performance@freebsd.org Cc: current@freebsd.org Subject: PostgreSQL performance on FreeBSD Hi, I did some measurements and hacks to see about the performance and scalabil= ity of PostgreSQL 9.3 on FreeBSD, sponsored by The FreeBSD Foundation. The results are described in https://kib.kiev.ua/kib/pgsql_perf.pdf. The uncommitted patches, referenced in the article, are available as https:= //kib.kiev.ua/kib/pig1.patch.txt https://kib.kiev.ua/kib/patch-2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F21EDC44C64DB34B90AF485AC3CEDD4B353982C1>