From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: epoll_wait returning EFAULT on Linux 3.2.78 |
Date: | 2016-06-02 17:04:34 |
Message-ID: | 20160602170434.kn3qqcefrk7luaq3@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2016-06-02 17:50:20 +0100, Greg Stark wrote:
> So FYI, it does look like Postgres built in 32-bit mode, at least
> pointers are 32 bits. But I think maxalign might still be enough due
> to doubles being 64 bits.
That makes sense independent of 32 vs. 64 system. Part of the relevant
struct probably require 8 byte alignment:
typedef union epoll_data {
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
struct epoll_event {
uint32_t events; /* Epoll events */
epoll_data_t data; /* User data variable */
};
So using long long alignment seems the best bet here.
Greg, are you writing & testing a patch? Or should I write something for
you to test?
Regards,
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2016-06-02 17:15:54 | Re: epoll_wait returning EFAULT on Linux 3.2.78 |
Previous Message | Tom Lane | 2016-06-02 17:02:56 | Re: epoll_wait returning EFAULT on Linux 3.2.78 |