Re: Way to check whether a particular block is on the shared_buffer?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Way to check whether a particular block is on the shared_buffer?
Дата
Msg-id CA+TgmobFXhRJ-Qi8oD+dd=h1nc_5U7imfh+XBu9zyc1hhVEG5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Way to check whether a particular block is on the shared_buffer?  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Ответы Re: Way to check whether a particular block is on the shared_buffer?  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
On Thu, Mar 3, 2016 at 8:54 PM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
> I found one other, but tiny, problem to implement SSD-to-GPU direct
> data transfer feature under the PostgreSQL storage.
>
> Extension cannot know the raw file descriptor opened by smgr.
>
> I expect an extension issues an ioctl(2) on the special device file
> on behalf of the special kernel driver, to control the P2P DMA.
> This ioctl(2) will pack file descriptor of the DMA source and some
> various information (like base position, range, destination device
> pointer, ...).
>
> However, the raw file descriptor is wrapped in the fd.c, instead of
> the File handler, thus, not visible to extension. oops...
>
> The attached patch provides a way to obtain raw file descriptor (and
> relevant flags) of a particular File virtual file descriptor on
> PostgreSQL. (No need to say, extension has to treat the raw descriptor
> carefully not to give an adverse effect to the storage manager.)
>
> How about this tiny enhancement?

Why not FileDescriptor(), FileFlags(), FileMode() as separate
functions like FilePathName()?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench small bug fix
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: Upper planner pathification