linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [rfc 0/3] Cleaning up soft-dirty bit usage
@ 2014-04-03 18:48 Cyrill Gorcunov
  2014-04-03 18:48 ` [rfc 1/3] mm: pgtable -- Drop unneeded preprocessor ifdef Cyrill Gorcunov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2014-04-03 18:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: gorcunov, linux-mm

Hi! I've been trying to clean up soft-dirty bit usage. I can't cleanup
"ridiculous macros in pgtable-2level.h" completely because I need to
define _PAGE_FILE,_PAGE_PROTNONE,_PAGE_NUMA bits in sequence manner
like

#define _PAGE_BIT_FILE		(_PAGE_BIT_PRESENT + 1)	/* _PAGE_BIT_RW */
#define _PAGE_BIT_NUMA		(_PAGE_BIT_PRESENT + 2)	/* _PAGE_BIT_USER */
#define _PAGE_BIT_PROTNONE	(_PAGE_BIT_PRESENT + 3)	/* _PAGE_BIT_PWT */

which can't be done right now because numa code needs to save original
pte bits for example in __split_huge_page_map, if I'm not missing something
obvious.

Also if we ever redefine the bits above we will need to update PAT code
which uses _PAGE_GLOBAL + _PAGE_PRESENT to make pte_present return true
or false.

Another weird thing I found is the following sequence:

   mprotect_fixup
    change_protection (passes @prot_numa = 0 which finally ends up in)
      ...
      change_pte_range(..., prot_numa)

			if (!prot_numa) {
				...
			} else {
				... this seems to be dead code branch ...
			}

    is it intentional, and @prot_numa argument is supposed to be passed
    with prot_numa = 1 one day, or it's leftover from old times?

Note I've not yet tested the series building it now, hopefully finish
testing in a couple of hours.

Linus, by saying "define the bits we use when PAGE_PRESENT==0 separately
and explicitly" you meant complete rework of the bits, right? Not simply
group them in once place in a header?

	Cyrill

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-07 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 18:48 [rfc 0/3] Cleaning up soft-dirty bit usage Cyrill Gorcunov
2014-04-03 18:48 ` [rfc 1/3] mm: pgtable -- Drop unneeded preprocessor ifdef Cyrill Gorcunov
2014-04-03 18:48 ` [rfc 2/3] mm: pgtable -- Require X86_64 for soft-dirty tracker Cyrill Gorcunov
2014-04-03 18:48 ` [rfc 3/3] mm: pgtable -- Use _PAGE_SOFT_DIRTY for swap entries Cyrill Gorcunov
2014-04-07 13:07 ` [rfc 0/3] Cleaning up soft-dirty bit usage Kirill A. Shutemov
2014-04-07 13:24   ` Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).