Re: [PATCH v17 08/26] x86/mm: Introduce _PAGE_COW
From: Yu, Yu-cheng <hidden>
Date: 2021-01-21 21:46:03
Also in:
linux-arch, linux-doc, linux-mm, lkml
From: Yu, Yu-cheng <hidden>
Date: 2021-01-21 21:46:03
Also in:
linux-arch, linux-doc, linux-mm, lkml
On 1/21/2021 12:41 PM, Borislav Petkov wrote:
On Thu, Jan 21, 2021 at 12:16:23PM -0800, Yu, Yu-cheng wrote:quoted
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.
Ok, I will change it to the more readable code as stated earlier. -- Yu-cheng