Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2023 09:49:00 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 98844e99d40a - main - aio: Fix more synchronization issues in aio_biowakeup.
Message-ID:  <2fb2622d-8aae-af37-2e52-df7f20e27646@FreeBSD.org>
In-Reply-To: <CAOtMX2iEMKpXm5bayGGpSTkLVNF4==6d3_aEQKuE0jpiwQxb4g@mail.gmail.com>
References:  <202302152133.31FLXEep021521@gitrepo.freebsd.org> <CAOtMX2iEMKpXm5bayGGpSTkLVNF4==6d3_aEQKuE0jpiwQxb4g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/15/23 2:05 PM, Alan Somers wrote:
> On Wed, Feb 15, 2023 at 2:33 PM John Baldwin <jhb@freebsd.org> wrote:
>>
>> The branch main has been updated by jhb:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=98844e99d40a90ae89d84762e07150af3a8f89bd
>>
>> commit 98844e99d40a90ae89d84762e07150af3a8f89bd
>> Author:     John Baldwin <jhb@FreeBSD.org>
>> AuthorDate: 2023-02-15 21:32:52 +0000
>> Commit:     John Baldwin <jhb@FreeBSD.org>
>> CommitDate: 2023-02-15 21:32:52 +0000
>>
>>      aio: Fix more synchronization issues in aio_biowakeup.
>>
>>      - Use atomic_store to set job->error.  atomic_set does an or
>>        operation, not assignment.
>>
>>      - Use refcount_* to manage job->nbio.
>>
>>        This ensures proper memory barriers are present so that the last bio
>>        won't see a possibly stale value of job->error.
>>
>>      - Don't re-read job->error after reading it via atomic_load.
>>
>>      Reported by:    markj (1)
>>      Reviewed by:    mjg, markj
>>      Differential Revision:  https://reviews.freebsd.org/D38611
> 
> Thanks for fixing these subtle problems in aio_(read|write)v.  Will you MFC too?

Yes.  I only noticed these while reviewing the original fix from the folks at
TidalScale FWIW.

-- 
John Baldwin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2fb2622d-8aae-af37-2e52-df7f20e27646>