Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1644953
| From | Qing Huang <qing.huang@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ib/core: not to set page dirty bit if it's already set. |
| Date | 2017-05-19 01:30 +0200 |
| Message-ID | <tID1M-1LH-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This change will optimize kernel memory deregistration operations.
__ib_umem_release() used to call set_page_dirty_lock() against every
writable page in its memory region. Its purpose is to keep data
synced between CPU and DMA device when swapping happens after mem
deregistration ops. Now we choose not to set page dirty bit if it's
already set by kernel prior to calling __ib_umem_release(). This
reduces memory deregistration time by half or even more when we ran
application simulation test program.
Signed-off-by: Qing Huang <qing.huang@oracle.com>
---
drivers/infiniband/core/umem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 3dbf811..21e60b1 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -58,7 +58,7 @@ static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int d
for_each_sg(umem->sg_head.sgl, sg, umem->npages, i) {
page = sg_page(sg);
- if (umem->writable && dirty)
+ if (!PageDirty(page) && umem->writable && dirty)
set_page_dirty_lock(page);
put_page(page);
}
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ib/core: not to set page dirty bit if it's already set. Qing Huang <qing.huang@oracle.com> - 2017-05-19 01:30 +0200
Re: [PATCH] ib/core: not to set page dirty bit if it's already set. Christoph Hellwig <hch@infradead.org> - 2017-05-19 15:10 +0200
Re: [PATCH] ib/core: not to set page dirty bit if it's already set. Qing Huang <qing.huang@oracle.com> - 2017-05-23 01:50 +0200
Re: [PATCH] ib/core: not to set page dirty bit if it's already set. Christoph Hellwig <hch@infradead.org> - 2017-05-23 09:50 +0200
Re: [PATCH] ib/core: not to set page dirty bit if it's already set. Qing Huang <qing.huang@oracle.com> - 2017-05-23 23:50 +0200
csiph-web