[PATCH] Optimize out pte_chain take three
From: Dave McCracken <hidden>
Date: 2002-07-10 14:34:16
Attachments
- rmap-opt-2.5.25-3.diff [text/plain] 8226 bytes · preview
From: Dave McCracken <hidden>
Date: 2002-07-10 14:34:16
--On Tuesday, July 09, 2002 05:21:11 PM -0700 Andrew Morton [off-list ref] wrote:
Seems sane and simple, thanks.
This bit is icky:
+ union {
+ struct pte_chain * _pte_chain; /* Reverse pte mapping
pointer. * protected by
PG_chainlock */ + pte_t * _pte_direct;
+ } _pte_union;
...
+
+#define pte__chain _pte_union._pte_chain
+#define pte_direct _pte_union._pte_direct
You could instead make it just a void * and have:I agree that it's icky, at least the #defines. However, I don't like using void *, either. After thinking about it overnight, I think I prefer exposing the union along the lines of pte.chain and pte.direct. Attached is a patch with that change, plus a couple of logic tweaks to fix a small hole. Dave ====================================================================== Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059 dmccr@us.ibm.com T/L 678-3059