[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 4 Apr 2020 16:07:31 +0300
From: Pavel Begunkov <asml.silence@...il.com>
To: Christoph Hellwig <hch@....de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Jens Axboe <axboe@...nel.dk>, Felipe Balbi <balbi@...nel.org>,
amd-gfx@...ts.freedesktop.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Felix Kuehling <Felix.Kuehling@....com>,
linux-usb@...r.kernel.org, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
intel-gfx@...ts.freedesktop.org,
Alex Deucher <alexander.deucher@....com>,
intel-gvt-dev@...ts.freedesktop.org,
Jason Wang <jasowang@...hat.com>
Subject: Re: [Intel-gfx] [PATCH 5/6] kernel: better document the
use_mm/unuse_mm API contract
On 04/04/2020 12:41, Christoph Hellwig wrote:
> Switch the function documentation to kerneldoc comments, and add
> WARN_ON_ONCE asserts that the calling thread is a kernel thread and
> does not have ->mm set (or has ->mm set in the case of unuse_mm).
>
> Also give the functions a kthread_ prefix to better document the
> use case.
>
io_uring and io-wq bits LGTM.
> --- a/include/linux/kthread.h
> +++ b/include/linux/kthread.h
...
> -/*
> - * unuse_mm
> - * Reverses the effect of use_mm, i.e. releases the
> - * specified mm context which was earlier taken on
> - * by the calling kernel thread
> - * (Note: this routine is intended to be called only
> - * from a kernel thread context)
> +/**
> + * kthread_use_mm - reverse the effect of kthread_use_mm()
s/kthread_use_mm/kthread_unuse_mm/
for the first one
> + * @mm: address space to operate on
> */
> -void unuse_mm(struct mm_struct *mm)
> +void kthread_unuse_mm(struct mm_struct *mm)
> {
--
Pavel Begunkov
Powered by blists - more mailing lists