Re: [PATCH v1 3/5] mm/memory_hotplug: make offline_and_remove_memory() timeout instead of failing on fatal signals

2023-06-27 Thread John Hubbard via Virtualization
better fit for some users. So rather than (ab)using offline_pages, would be make more sense to extract basic offlining steps and allow drivers like virtio-mem to reuse them and define their own policy? ...like this, perhaps. Sounds promising! thanks, -- John Hubb

Re: [PATCH 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-06-12 Thread John Hubbard
On 2020-06-12 12:24, Matthew Wilcox wrote: On Fri, May 29, 2020 at 04:43:08PM -0700, John Hubbard wrote: +CASE 5: Pinning in order to write to the data within the page +- +Even though neither DMA nor Direct IO is involved, just

[PATCH v2 2/2] vhost: convert get_user_pages() --> pin_user_pages()

2020-05-31 Thread John Hubbard
: Michael S. Tsirkin Cc: Jason Wang Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: John Hubbard --- drivers/vhost/vhost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers

[PATCH v2 0/2] vhost, docs: convert to pin_user_pages(), new "case 5"

2020-05-31 Thread John Hubbard
ps://lore.kernel.org/r/20200527194953.11130-1-jhubb...@nvidia.com [2] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz John Hubbard (2): docs: mm/gup: pin_user_pages.rst: add a "case 5" vhost: convert get_user_pages() --> pin_user_pages() Documentation

[PATCH v2 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-05-31 Thread John Hubbard
unpin" case. Add a fifth case, to help explain that there is a general pattern that requires pin_user_pages*() API calls. Cc: Vlastimil Babka Cc: Jan Kara Cc: Jérôme Glisse Cc: Dave Chinner Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Signed-of

Re: [PATCH 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-05-31 Thread John Hubbard
age_dirty_lock() +put_page() + I'll send a v2 shortly. thanks, -- John Hubbard NVIDIA ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH 2/2] vhost: convert get_user_pages() --> pin_user_pages()

2020-05-29 Thread John Hubbard
: Michael S. Tsirkin Cc: Jason Wang Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: John Hubbard --- drivers/vhost/vhost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers

[PATCH 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-05-29 Thread John Hubbard
unpin" case. Add a fifth case, to help explain that there is a general pattern that requires pin_user_pages*() API calls. Cc: Vlastimil Babka Cc: Jan Kara Cc: Jérôme Glisse Cc: Dave Chinner Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Signed-of

[PATCH 0/2] vhost, docs: convert to pin_user_pages(), new "case 5"

2020-05-29 Thread John Hubbard
include cross-compiling for a few other arches. Any run-time testing would be greatly appreciated. [1] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz John Hubbard (2): docs: mm/gup: pin_user_pages.rst: add a "case 5" vhost: convert get_user_pages() --> p

Re: [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-08-07 Thread John Hubbard
On 8/6/19 11:34 PM, Christoph Hellwig wrote: On Mon, Aug 05, 2019 at 03:54:35PM -0700, John Hubbard wrote: On 7/23/19 11:17 PM, Christoph Hellwig wrote: ... I think we can do this in a simple and better way. We have 5 ITER_* types. Of those ITER_DISCARD as the name suggests never uses pages

Re: [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-08-05 Thread John Hubbard
ect I/O path, > which leaves us with three. > Hi Christoph, Are you working on anything like this? Or on the put_user_bvec() idea? Please let me know, otherwise I'll go in and implement something here. thanks, -- John Hubbard NVIDIA > Out of those ITER_BVEC needs a user page reference, so we want

Re: [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-07-25 Thread John Hubbard
On 7/24/19 5:41 PM, Bob Liu wrote: > On 7/24/19 12:25 PM, john.hubb...@gmail.com wrote: >> From: John Hubbard >> >> Hi, >> >> This is mostly Jerome's work, converting the block/bio and related areas >> to call put_user_page*() instead of put_page(). B

Re: [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-07-24 Thread John Hubbard
We'll need to clean up > various bits of code for that, but that can be done gradually before > even getting to the actual put_user_pages conversion. > Sounds great. I'm part way into it and it doesn't look too bad. The main question is where to scatter vari

Re: [PATCH 07/12] vhost-scsi: convert put_page() to put_user_page*()

2019-07-24 Thread John Hubbard
; + * refcount will go wrong (this is in vhost_scsi_release_cmd()) > + */ > + WARN_ON(!iov_iter_get_pages_use_gup(iter)); > + ... thanks, -- John Hubbard NVIDIA ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH 12/12] fs/ceph: fix a build warning: returning a value from void function

2019-07-24 Thread john . hubbard
From: John Hubbard Trivial build warning fix: don't return a value from a function whose type is "void". Signed-off-by: John Hubbard --- fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 2eb88ed22993..fa

[PATCH 11/12] 9p/net: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
sions"). Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: v9fs-develo...@lists.sourceforge.net Cc: Jan Kara Cc: Dan Williams Cc: Alexander Viro Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc:

[PATCH 10/12] fs/ceph: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
sions"). Changes from Jérôme's original patch: * Use the enhanced put_user_pages_dirty_lock(). Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: ceph-de...@vger.kernel.org Cc: Jan Kara Cc: Dan Wi

[PATCH 08/12] fs/cifs: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
sions"). Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-c...@vger.kernel.org Cc: Jan Kara Cc: Dan Williams Cc: Alexander Viro Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Jens Axboe

[PATCH 07/12] vhost-scsi: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
sions"). Changes from Jérôme's original patch: * Changed a WARN_ON to a BUG_ON. Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: virtualization@lists.linux-foundation.org Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: Jan Kara Cc: Dan Wi

[PATCH 06/12] fs/nfs: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
older versions"). Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-...@vger.kernel.org Cc: Jan Kara Cc: Dan Williams Cc: Alexander Viro Cc: Johannes Thumshirn Cc: Christoph Hellwig

[PATCH 04/12] block: bio_release_pages: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
ôme Glisse Signed-off-by: John Hubbard Cc: Christoph Hellwig Cc: Minwoo Im Cc: Jens Axboe --- block/bio.c | 60 - include/linux/bio.h | 1 + 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/block/bio.c b/block/bio.c index 76

[PATCH 05/12] block_dev: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
older versions"). Changes from Jérôme's original patch: * reworked to be compatible with recent bio_release_pages() changes. Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: Jan Kar

[PATCH 03/12] block: bio_release_pages: use flags arg instead of bool

2019-07-24 Thread john . hubbard
From: John Hubbard In commit d241a95f3514 ("block: optionally mark pages dirty in bio_release_pages"), new "bool mark_dirty" argument was added to bio_release_pages. In upcoming work, another bool argument (to indicate that the pages came from get_user_pages) is going to

[PATCH 02/12] iov_iter: add helper to test if an iter would use GUP v2

2019-07-24 Thread john . hubbard
. * Fix up the kerneldoc comment to "Return:" rather than "Returns:", and a few other grammatical tweaks. Signed-off-by: Jérôme Glisse Signed-off-by: John Hubbard Cc: linux-fsde...@vger.kernel.org Cc: linux-bl...@vger.kernel.org Cc: linux...@kvack.org Cc: John Hubbard Cc: Jan Ka

[PATCH 01/12] mm/gup: add make_dirty arg to put_user_pages_dirty_lock()

2019-07-24 Thread john . hubbard
From: John Hubbard Provide more capable variation of put_user_pages_dirty_lock(), and delete put_user_pages_dirty(). This is based on the following: 1. Lots of call sites become simpler if a bool is passed into put_user_page*(), instead of making the call site choose which put_user_page

[PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-07-24 Thread john . hubbard
From: John Hubbard Hi, This is mostly Jerome's work, converting the block/bio and related areas to call put_user_page*() instead of put_page(). Because I've changed Jerome's patches, in some cases significantly, I'd like to get his feedback before we actually leave him listed as the author (he