Thread (39 messages) 39 messages, 7 authors, 2002-07-13
STALE8749d

[PATCH] Optimize out pte_chain take three

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help