Re: LWLock contention: I think I understand the problem
| От | Thomas Lockhart |
|---|---|
| Тема | Re: LWLock contention: I think I understand the problem |
| Дата | |
| Msg-id | 3C2E1852.F2E6DF82@fourpalms.org обсуждение исходный текст |
| Ответ на | LWLock contention: I think I understand the problem (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: LWLock contention: I think I understand the problem
|
| Список | pgsql-hackers |
...
> It would seem, therefore, that lwlock.c's behavior of immediately
> granting the lock to released waiters is not such a good idea after all.
> Perhaps we should release waiters but NOT grant them the lock; when they
> get to run, they have to loop back, try to get the lock, and possibly go
> back to sleep if they fail. This apparent waste of cycles is actually
> beneficial because it saves context swaps overall.
Hmm. Seems reasonable. In some likely scenerios, it would seem that the
waiters *could* grab the lock when they are next scheduled, since the
current locker would have finished at least one
grab/release/grab/release cycle in the meantime.
How hard will it be to try this out?
- Thomas
В списке pgsql-hackers по дате отправления: