Re: Do we need so many hint bits? - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: Do we need so many hint bits?
Date
Msg-id CAOeZVicPMe6oP3QpQOn8mv8PpNeNHbACYiwHcb0Csrgdtb=0yQ@mail.gmail.com
Whole thread Raw
In response to Re: Do we need so many hint bits?  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Do we need so many hint bits?  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers



On Tue, Nov 20, 2012 at 12:08 AM, Jeff Davis <pgsql@j-davis.com> wrote:
On Mon, 2012-11-19 at 23:50 +0530, Atri Sharma wrote:

> Sorry If I am being a bit naive, but shouldnt a simple mutex work in
> the case when a process wants to change the VM bit in cache?
>
> Mutex would be cheaper than locks.
>
I thought mutexes are locks?

The point is to avoid taking new locks (or mutexes) during a read of the
VM bit, because there is concern that it could cause contention. If we
lock the entire VM page, that represents many, many data pages, so it's
worrisome.

Regards,
        Jeff Davis



My mistake...I thought we were more concerned about the cost of locking.

I agree, locking many data pages simultaneously could be hazardous.

This requires more thought.Maybe removing PD_ALL_VISIBLE isnt such a great idea after all...

Atri

--
Regards,
 
Atri
l'apprenant

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Do we need so many hint bits?
Next
From: Jeff Davis
Date:
Subject: Re: Do we need so many hint bits?