User: Password:
|
|
Subscribe / Log in / New account

How 3.6 nearly broke PostgreSQL

How 3.6 nearly broke PostgreSQL

Posted Oct 3, 2012 18:22 UTC (Wed) by cmccabe (guest, #60281)
Parent article: How 3.6 nearly broke PostgreSQL

It seems like anyone who uses pthread_spin_lock or a similar thing could run into this problem. Whenever one thread waits on another, without telling the kernel, the kernel might make a scheduling decision that ends up being suboptimal (like putting them both on the same core.)


(Log in to post comments)

How 3.6 nearly broke PostgreSQL

Posted Oct 3, 2012 19:09 UTC (Wed) by martinfick (subscriber, #4455) [Link]

Agreed. My limited opinion is simply that spinning is a sometimes neccessary evil; avoid it whenever possible; use a kernel supported mechanism if you expect to get consistent kernel behavior.

How 3.6 nearly broke PostgreSQL

Posted Oct 5, 2012 20:45 UTC (Fri) by jhoblitt (subscriber, #77733) [Link]

Couldn't libpthreads notify the kernel that pthread_spin_lock() is in use? You certainly wouldn't want to introduce a system call on every use but having to branch on the first use by a given pid shouldn't be too expensive.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds