linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: linux-mm <linux-mm@kvack.org>
Cc: riel@redhat.com, Andrew Morton <akpm@linux-foundation.org>
Subject: Maybe move ->anon_vma_chain ?
Date: Thu, 18 Aug 2016 17:39:49 +0300	[thread overview]
Message-ID: <CACVxJT8xH5MLtbqMcNFScNx6chOvQ69OHan8coACeUAVkGkS=g@mail.gmail.com> (raw)

FYI,

on x86_64, ->anon_vma_chain has offset 120 inside the structure
which means that:
* on CONFIG_NUMA=n CONFIG_USERFAULTFD=n kernels
every 4-th VMA has this list head spanning 2 cachelines and,

* on CONFIG_NUMA=y CONFIG_USERFAULTFD=y kernels
_every_ VMA has this peculiar property.

Now I don't know good benchmark for anon vmas,
but maybe you do.


struct vm_area_struct {
vm_start;             /*     0     8 */
vm_end;               /*     8     8 */
vm_next;              /*    16     8 */
vm_prev;              /*    24     8 */
vm_rb;                /*    32    24 */
rb_subtree_gap;       /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
vm_mm;                /*    64     8 */
vm_page_prot;         /*    72     8 */
vm_flags;             /*    80     8 */

rb;                   /*    88    24 */
rb_subtree_last;      /*   112     8 */
                      /*    88    32 */


===>   struct list_head anon_vma_chain; /*   120    16 */
        /* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */


anon_vma;             /*   136     8 */
struct  * vm_ops;     /*   144     8 */
vm_pgoff;             /*   152     8 */
vm_file;              /*   160     8 */
vm_private_data;      /*   168     8 */
vm_userfaultfd_ctx;   /*   176     0 */

        /* size: 176, cachelines: 3, members: 17 */
        /* last cacheline: 48 bytes */
};

--
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>

             reply	other threads:[~2016-08-18 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 14:39 Alexey Dobriyan [this message]
2016-08-18 14:45 ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACVxJT8xH5MLtbqMcNFScNx6chOvQ69OHan8coACeUAVkGkS=g@mail.gmail.com' \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox