Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647741
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ib/core: not to set page dirty bit if it's already set. |
| Date | 2017-05-23 09:50 +0200 |
| Message-ID | <tKcJQ-65-9@gated-at.bofh.it> (permalink) |
| References | <tID1M-1LH-3@gated-at.bofh.it> <tIPPk-2BD-9@gated-at.bofh.it> <tK5fk-3JA-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 22, 2017 at 04:43:57PM -0700, Qing Huang wrote: > > On 5/19/2017 6:05 AM, Christoph Hellwig wrote: > > On Thu, May 18, 2017 at 04:33:53PM -0700, Qing Huang wrote: > > > 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. > > As far as I can tell this code doesn't even need set_page_dirty_lock > > and could just use set_page_dirty > > It seems that set_page_dirty_lock has been used here for more than 10 years. > Don't know the original purpose. Maybe it was used to prevent races between > setting dirty bits and swapping out pages? I suspect copy & paste. Or maybe I don't actually understand the explanation of set_page_dirty vs set_page_dirty_lock enough. But I'd rather not hack around the problem.
Back to linux.kernel | Previous | Next — Previous in thread | 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