Re: semtimedop instead of setitimer/semop/setitimer

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: semtimedop instead of setitimer/semop/setitimer
Date: 2003-09-20 18:15:15
Message-ID: 3F6C9933.6060400@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>Manfred Spraul <manfred(at)colorfullife(dot)com> writes:
>
>
>>... Initially I tried to increase MAX_ALIGNOF to 16, but
>>the result didn't work:
>>
>>
>
>You would need to do a full recompile and initdb to alter MAX_ALIGNOF.
>
I think I did that, but it still failed. 7.4cvs works, I'll ignore it.
MAX_ALIGNOF affects the on-disk format, correct? Then I agree that it's
the wrong to change it.

>However, if you are wanting to raise it past about 8, that's probably
>not the way to go anyway; it would create padding wastage in too many
>places. It would make more sense to allocate the buffers using a
>variant ShmemAlloc that could be told to align this particular object
>on an N-byte boundary. Then it costs you no more than N bytes in the
>one place.
>
I agree, I'll write a patch.

>(BTW, I wonder whether there would be any win in allocating the buffers
>on a 4K or 8K page boundary... do any kernels use virtual memory mapping
>tricks to replace data copying in such cases?)
>
Linux doesn't. Page table games are considered as evil, because tlb
flushing is expensive, especially on SMP.

--
Manfred

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-20 18:45:23 Re: semtimedop instead of setitimer/semop/setitimer
Previous Message Tom Lane 2003-09-20 17:33:09 Re: semtimedop instead of setitimer/semop/setitimer

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-20 18:45:23 Re: semtimedop instead of setitimer/semop/setitimer
Previous Message Tom Lane 2003-09-20 17:33:09 Re: semtimedop instead of setitimer/semop/setitimer