Re: Extended Prefetching using Asynchronous IO - proposal and patch

Поиск
Список
Период
Сортировка
От John Lumby
Тема Re: Extended Prefetching using Asynchronous IO - proposal and patch
Дата
Msg-id BAY175-W43B18F9E6D68BEEA6E7D19A3240@phx.gbl
обсуждение исходный текст
Ответ на Re: Extended Prefetching using Asynchronous IO - proposal and patch  (John Lumby <johnlumby@hotmail.com>)
Список pgsql-hackers


> Date: Thu, 29 May 2014 18:00:28 -0300
> Subject: Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch
> From: klaussfreire@gmail.com
> To: hlinnakangas@vmware.com
> CC: johnlumby@hotmail.com; pgsql-hackers@postgresql.org
>

> >>>
> >>> Even if it worked on Linux today, it would be a bad idea to rely on it
> >>> from
> >>> a portability point of view. No, the only sane way to make this work is
> >>> that
> >>> the process that initiates an I/O request is responsible for completing
> >>> it.


I meant to add  -  it is really a significant benefit that a bkend
can wait on the aio of a different bkend's original prefeetching aio_read.
Remember that we check completion only when the bkend decides it really
wants the block in a buffer,    i.e ReadBuffer and friends,
which might be a very long time after it had issued the prefetch request,
or even never (see below).    We don't want other bkends which want that
block to have to wait for the originator to get around to reading it.
*Especially* since the originator may *never* read it if it quits its scan early
leaving prefetched but unread blocks behind.   (Which is also taken
care of in the patch).


> >>> If another process needs to wait for an async I/O to complete, we must
> >>> use
> >>> some other means to do the waiting. Like the io_in_progress_lock that we
> >>> already have, for the same purpose.

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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Extended Prefetching using Asynchronous IO - proposal and patch
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Extended Prefetching using Asynchronous IO - proposal and patch