memory management talk + patches for femalloc+xtbench
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: mm@80x24.org
Cc: Eric Wong <normalperson@yhbt.net>
Subject: [PATCH] experimental mutex-free wfs usage
Date: Mon, 18 Aug 2014 05:17:04 +0000	[thread overview]
Message-ID: <1408339024-18985-1-git-send-email-normalperson@yhbt.net> (raw)

patch sent to lltng-dev
ref: <20140818050254.GA13470@dcvr.yhbt.net>
---
 femalloc.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/femalloc.c b/femalloc.c
index 5ca49ec..fb0a04c 100644
--- a/femalloc.c
+++ b/femalloc.c
@@ -1103,7 +1103,7 @@ typedef struct malloc_segment* msegmentptr;
 
 struct malloc_state {
   struct     cds_list_head arena_node;
-  struct     cds_wfs_stack remote_free_stack;
+  struct     __cds_wfs_stack remote_free_stack;
   binmap_t   smallmap;
   binmap_t   treemap;
   size_t     dvsize;
@@ -2784,12 +2784,6 @@ static inline size_t internal_free(mstate m, void *mem)
   return 0;
 }
 
-/* mutex-ignorant version of _cds_wfs_init */
-static inline void
-nomtx_cds_wfs_init(struct cds_wfs_stack *s) {
-  s->head = CDS_WFS_END;
-}
-
 /* process remote free requests, returns usable bytes freed */
 static size_t remote_free_finish(mstate ms) {
   size_t usable_bytes_freed = 0;
@@ -3035,7 +3029,7 @@ static mstate init_user_mstate(char* tbase, size_t tsize) {
   mchunkptr msp = align_as_chunk(tbase);
   mstate m = (mstate)(chunk2mem(msp));
   memset(m, 0, msize);
-  nomtx_cds_wfs_init(&m->remote_free_stack);
+  ___cds_wfs_init(&m->remote_free_stack);
   msp->head = (msize|INUSE_BITS);
   m->seg.base = m->least_addr = tbase;
   m->seg.size = tsize;
-- 
EW


                 reply	other threads:[~2014-08-18  5:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1408339024-18985-1-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=mm@80x24.org \
    /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