Thread (59 messages) 59 messages, 6 authors, 2021-01-27

Re: [PATCH v17 08/26] x86/mm: Introduce _PAGE_COW

From: Borislav Petkov <bp@alien8.de>
Date: 2021-01-21 20:42:49
Also in: linux-arch, linux-doc, linux-mm, lkml

On Thu, Jan 21, 2021 at 12:16:23PM -0800, Yu, Yu-cheng wrote:
It clears _PAGE_DIRTY and sets _PAGE_COW.  That is,

if (pte.pte & _PAGE_DIRTY) {
	pte.pte &= ~_PAGE_DIRTY;
	pte.pte |= _PAGE_COW;
}

So, shifting makes resulting code more efficient.
Efficient for what? Is this a hot path?

If not, I'd take readable code any day of the week.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help