From: | Tomas Vondra <tomas(at)vondra(dot)me> |
---|---|
To: | Christoph Berg <myon(at)debian(dot)org>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Introduce pg_shmem_allocations_numa view |
Date: | 2025-06-25 09:22:41 |
Message-ID: | e4fe7d48-668b-4b38-8a69-da5f5b900be7@vondra.me |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 6/25/25 11:00, Christoph Berg wrote:
> Re: Bertrand Drouvot
>> +/*
>> + * Work around Linux kernel bug in 32-bit compat mode: do_pages_stat() has
>> + * incorrect pointer arithmetic for more than DO_PAGES_STAT_CHUNK_NR pages.
>> + */
>> +#if SIZEOF_SIZE_T == 4
>
> I was also missing it in my suggested patch draft, but this should
> probably include #ifdef __linux__.
>
>
> Re: Tomas Vondra
>> +#ifdef USE_VALGRIND
>> +
>> +static inline void
>> +pg_numa_touch_mem_if_required(uint64 tmp, char *ptr)
>
> Stupid question, if this function gets properly inlined, why not
> always use it as there should be no performance difference vs using a
> macro?
>
TBH I'm not 100% sure it works correctly, I need to check it actually
touches the memory etc. It's possible it was discussed in one of the
earlier NUMA threads, and there are reasons to do a macro.
I also dislike the ifdefs because it adds subtle differences between the
"normal" code and the code tested with valgrind. So just having the
inlined function would be "nicer".
regards
--
Tomas Vondra
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-06-25 09:31:36 | Re: pgsql: Introduce pg_shmem_allocations_numa view |
Previous Message | Christoph Berg | 2025-06-25 09:00:38 | Re: pgsql: Introduce pg_shmem_allocations_numa view |
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Fan | 2025-06-25 09:28:50 | Re: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions |
Previous Message | Peter Eisentraut | 2025-06-25 09:01:43 | Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. |