Update outdated references to the SLRU ControlLock

SLRU bank locks are referred as "bank locks" or "SLRU bank locks" in the
code comments.  The comments updated in this commit use the latter term.

Oversight in 53c2a97a92, that has replaced the single ControlLock by
the bank control locks.

Author: Julien Rouhaud <julien.rouhaud@free.fr>
Discussion: https://postgr.es/m/aLUT2UO8RjJOzZNq@jrouhaud
Backpatch-through: 17
master
Michael Paquier 1 week ago
parent 229911c4bf
commit c6ea528b47
  1. 10
      src/backend/access/transam/slru.c
  2. 2
      src/include/access/slru.h

@ -400,10 +400,10 @@ SimpleLruZeroPage(SlruCtl ctl, int64 pageno)
/* /*
* Assume this page is now the latest active page. * Assume this page is now the latest active page.
* *
* Note that because both this routine and SlruSelectLRUPage run with * Note that because both this routine and SlruSelectLRUPage run with a
* ControlLock held, it is not possible for this to be zeroing a page that * SLRU bank lock held, it is not possible for this to be zeroing a page
* SlruSelectLRUPage is going to evict simultaneously. Therefore, there's * that SlruSelectLRUPage is going to evict simultaneously. Therefore,
* no memory barrier here. * there's no memory barrier here.
*/ */
pg_atomic_write_u64(&shared->latest_page_number, pageno); pg_atomic_write_u64(&shared->latest_page_number, pageno);
@ -437,7 +437,7 @@ SimpleLruZeroLSNs(SlruCtl ctl, int slotno)
* This is a convenience wrapper for the common case of zeroing a page and * This is a convenience wrapper for the common case of zeroing a page and
* immediately flushing it to disk. * immediately flushing it to disk.
* *
* Control lock is acquired and released here. * SLRU bank lock is acquired and released here.
*/ */
void void
SimpleLruZeroAndWritePage(SlruCtl ctl, int64 pageno) SimpleLruZeroAndWritePage(SlruCtl ctl, int64 pageno)

@ -55,7 +55,7 @@ typedef enum
/* /*
* Shared-memory state * Shared-memory state
* *
* ControlLock is used to protect access to the other fields, except * SLRU bank locks are used to protect access to the other fields, except
* latest_page_number, which uses atomics; see comment in slru.c. * latest_page_number, which uses atomics; see comment in slru.c.
*/ */
typedef struct SlruSharedData typedef struct SlruSharedData

Loading…
Cancel
Save