<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/debug/io-stats, branch v4.2dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>glusterfsd: Memleak in glusterfsd process while  brick mux is on</title>
<updated>2018-02-27T07:11:15+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2018-02-10T06:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7c3cc485054e4ede1efb358552135b432fb7047a'/>
<id>7c3cc485054e4ede1efb358552135b432fb7047a</id>
<content type='text'>
Problem: At the time of stopping the volume while brick multiplex is
         enabled memory is not cleanup from all server side xlators.

Solution: To cleanup memory for all server side xlators call fini
          in glusterfs_handle_terminate after send GF_EVENT_CLEANUP
          notification to top xlator.

BUG: 1544090
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

Note: Run all test-cases in separate build (https://review.gluster.org/19574)
      with same patch after enable brick mux forcefully, all test cases are
      passed.

Change-Id: Ia10dc7f2605aa50f2b90b3fe4eb380ba9299e2fc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: At the time of stopping the volume while brick multiplex is
         enabled memory is not cleanup from all server side xlators.

Solution: To cleanup memory for all server side xlators call fini
          in glusterfs_handle_terminate after send GF_EVENT_CLEANUP
          notification to top xlator.

BUG: 1544090
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

Note: Run all test-cases in separate build (https://review.gluster.org/19574)
      with same patch after enable brick mux forcefully, all test cases are
      passed.

Change-Id: Ia10dc7f2605aa50f2b90b3fe4eb380ba9299e2fc
</pre>
</div>
</content>
</entry>
<entry>
<title>xlators/features/namespace: Add namespace xlator and link into brick graph</title>
<updated>2018-02-21T09:52:17+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>varao@redhat.com</email>
</author>
<published>2018-02-12T05:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d0e7177416be3005b3f092addf0bba4dd9dc7a2d'/>
<id>d0e7177416be3005b3f092addf0bba4dd9dc7a2d</id>
<content type='text'>
The following release-3.8-fb branch patch is upstreamed:
&gt; features/namespace: Add namespace xlator and link into brick graph
&gt; Commit ID: dbd30776f26e
&gt; https://review.gluster.org/#/c/18041/
&gt; By Michael Goulet &lt;mgoulet@fb.com&gt;

Changes in this patch:
Removes extra config.h and namespace.h file in namespace.c
Adds default_getspec_cbk to libglusterfs.sym
Rename dict_for_each to dict_foreach_inline
Remove fd.h header file stack.h
Add test case for truncate, open and symlink

This patch is required to forward port io-threads namespace patch.
Updates: #401

Change-Id: Ib88c95b89eecee9b8957df8a4c8712c899c761d1
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following release-3.8-fb branch patch is upstreamed:
&gt; features/namespace: Add namespace xlator and link into brick graph
&gt; Commit ID: dbd30776f26e
&gt; https://review.gluster.org/#/c/18041/
&gt; By Michael Goulet &lt;mgoulet@fb.com&gt;

Changes in this patch:
Removes extra config.h and namespace.h file in namespace.c
Adds default_getspec_cbk to libglusterfs.sym
Rename dict_for_each to dict_foreach_inline
Remove fd.h header file stack.h
Add test case for truncate, open and symlink

This patch is required to forward port io-threads namespace patch.
Updates: #401

Change-Id: Ib88c95b89eecee9b8957df8a4c8712c899c761d1
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "glusterfsd: Memleak in glusterfsd process while  brick mux is on"</title>
<updated>2018-02-19T19:30:56+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2018-02-18T02:44:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e3e7cdbde5463ff6d20af52329a784ca629c6aef'/>
<id>e3e7cdbde5463ff6d20af52329a784ca629c6aef</id>
<content type='text'>
There are still remain some code paths where cleanup is required while
brick mux is on.I will upload a new patch after resolve all code paths.

This reverts commit b313d97faa766443a7f8128b6e19f3d2f1b267dd.

BUG: 1544090
Change-Id: I26ef1d29061092bd9a409c8933d5488e968ed90e
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are still remain some code paths where cleanup is required while
brick mux is on.I will upload a new patch after resolve all code paths.

This reverts commit b313d97faa766443a7f8128b6e19f3d2f1b267dd.

BUG: 1544090
Change-Id: I26ef1d29061092bd9a409c8933d5488e968ed90e
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfsd: Memleak in glusterfsd process while  brick mux is on</title>
<updated>2018-02-15T17:03:20+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2018-02-10T06:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b313d97faa766443a7f8128b6e19f3d2f1b267dd'/>
<id>b313d97faa766443a7f8128b6e19f3d2f1b267dd</id>
<content type='text'>
Problem: At the time of stopping the volume while brick multiplex is
         enabled memory is not cleanup from all server side xlators.

Solution: To cleanup memory for all server side xlators call fini
          in glusterfs_handle_terminate after send GF_EVENT_CLEANUP
          notification to top xlator.

BUG: 1544090
Change-Id: Ifa1525e25b697371276158705026b421b4f81140
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: At the time of stopping the volume while brick multiplex is
         enabled memory is not cleanup from all server side xlators.

Solution: To cleanup memory for all server side xlators call fini
          in glusterfs_handle_terminate after send GF_EVENT_CLEANUP
          notification to top xlator.

BUG: 1544090
Change-Id: Ifa1525e25b697371276158705026b421b4f81140
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/io-threads: expose io-thread queue depths</title>
<updated>2018-02-08T17:01:12+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>varao@redhat.com</email>
</author>
<published>2018-02-06T13:26:45+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aa4372bf427152f671de52fc6e02b93ca09f22c7'/>
<id>aa4372bf427152f671de52fc6e02b93ca09f22c7</id>
<content type='text'>
The following release-3.8-fb branch patch is upstreamed:

&gt; io-stats: Expose io-thread queue depths
&gt; Commit ID: 69509ee7d2
&gt; https://review.gluster.org/#/c/18143/
&gt; By Shreyas Siravara &lt;sshreyas@fb.com&gt;

Changes in this patch:
- Replace iot_pri_t with gf_fop_pri_t
- Replace IOT_PRI_{HI, LO, NORMAL, MAX, LEAST} with
  GF_FOP_PRI_{HI, LO, NORMAL, MAX, LEAST}
- Use dict_unref() instead of dict_destroy()

This patch is required to forward port io-threads namespace patch.
Updates: #401
Change-Id: I1b47a63185a441a30fbc423ca1015df7b36c2518
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following release-3.8-fb branch patch is upstreamed:

&gt; io-stats: Expose io-thread queue depths
&gt; Commit ID: 69509ee7d2
&gt; https://review.gluster.org/#/c/18143/
&gt; By Shreyas Siravara &lt;sshreyas@fb.com&gt;

Changes in this patch:
- Replace iot_pri_t with gf_fop_pri_t
- Replace IOT_PRI_{HI, LO, NORMAL, MAX, LEAST} with
  GF_FOP_PRI_{HI, LO, NORMAL, MAX, LEAST}
- Use dict_unref() instead of dict_destroy()

This patch is required to forward port io-threads namespace patch.
Updates: #401
Change-Id: I1b47a63185a441a30fbc423ca1015df7b36c2518
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug/io-stats: io-stats options for GD2</title>
<updated>2018-01-26T11:33:18+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2018-01-23T08:36:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cd66e4edae84033f426820e359927272ad4ae641'/>
<id>cd66e4edae84033f426820e359927272ad4ae641</id>
<content type='text'>
Updates #302

Change-Id: I8e7ff391cec88ea76f63ffe05b7404bdb31eaf8e
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates #302

Change-Id: I8e7ff391cec88ea76f63ffe05b7404bdb31eaf8e
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfs: Use gcc builtin ATOMIC operator to increase/decreate refcount.</title>
<updated>2017-12-12T09:05:56+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2017-10-20T07:09:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=430484c92ab5a6234958d1143e0bb14aeb0cd1c0'/>
<id>430484c92ab5a6234958d1143e0bb14aeb0cd1c0</id>
<content type='text'>
Problem: In glusterfs code base we call mutex_lock/unlock to take
         reference/dereference for a object.Sometime it could be
         reason for lock contention also.

Solution: There is no need to use mutex to increase/decrease ref
          counter, instead of using mutex use gcc builtin ATOMIC
          operation.

Test:   I have not observed yet how much performance gain after apply
        this patch specific to glusterfs but i have tested same
        with below small program(mutex and atomic both) and
        get good difference.

static int numOuterLoops;
static void *
threadFunc(void *arg)
{
    int j;

    for (j = 0; j &lt; numOuterLoops; j++) {
            __atomic_add_fetch (&amp;glob, 1,__ATOMIC_ACQ_REL);
    }
    return NULL;
}

int
main(int argc, char *argv[])
{
    int opt, s, j;
    int numThreads;
    pthread_t *thread;
    int verbose;
    int64_t n = 0;

    if (argc &lt; 2 ) {
     printf(" Please provide 2 args Num of threads &amp;&amp; Outer Loop\n");
     exit (-1);
    }
    numThreads = atoi(argv[1]);
    numOuterLoops = atoi (argv[2]);

    if (1) {
        printf("\tthreads: %d; outer loops: %d;\n",
                numThreads, numOuterLoops);
    }

    thread = calloc(numThreads, sizeof(pthread_t));
    if (thread == NULL) {
        printf ("calloc error so exit\n");
        exit (-1);
    }

    __atomic_store (&amp;glob, &amp;n, __ATOMIC_RELEASE);
    for (j = 0; j &lt; numThreads; j++) {
        s = pthread_create(&amp;thread[j], NULL, threadFunc, NULL);
        if (s != 0) {
            printf ("pthread_create failed so exit\n");
            exit (-1);
        }
    }

    for (j = 0; j &lt; numThreads; j++) {
        s = pthread_join(thread[j], NULL);
        if (s != 0) {
            printf ("pthread_join failed so exit\n");
            exit (-1);
        }
    }
    printf("glob value is %ld\n",__atomic_load_n (&amp;glob,__ATOMIC_RELAXED));

    exit(0);
}

   time ./thr_count 800 800000
   threads: 800; outer loops: 800000;
   glob value is 640000000

real	1m10.288s
user	0m57.269s
sys	3m31.565s

time ./thr_count_atomic 800 800000
     threads: 800; outer loops: 800000;
glob value is 640000000

real	0m20.313s
user	1m20.558s
sys	0m0.028

Change-Id: Ie5030a52ea264875e002e108dd4b207b15ab7cc7
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In glusterfs code base we call mutex_lock/unlock to take
         reference/dereference for a object.Sometime it could be
         reason for lock contention also.

Solution: There is no need to use mutex to increase/decrease ref
          counter, instead of using mutex use gcc builtin ATOMIC
          operation.

Test:   I have not observed yet how much performance gain after apply
        this patch specific to glusterfs but i have tested same
        with below small program(mutex and atomic both) and
        get good difference.

static int numOuterLoops;
static void *
threadFunc(void *arg)
{
    int j;

    for (j = 0; j &lt; numOuterLoops; j++) {
            __atomic_add_fetch (&amp;glob, 1,__ATOMIC_ACQ_REL);
    }
    return NULL;
}

int
main(int argc, char *argv[])
{
    int opt, s, j;
    int numThreads;
    pthread_t *thread;
    int verbose;
    int64_t n = 0;

    if (argc &lt; 2 ) {
     printf(" Please provide 2 args Num of threads &amp;&amp; Outer Loop\n");
     exit (-1);
    }
    numThreads = atoi(argv[1]);
    numOuterLoops = atoi (argv[2]);

    if (1) {
        printf("\tthreads: %d; outer loops: %d;\n",
                numThreads, numOuterLoops);
    }

    thread = calloc(numThreads, sizeof(pthread_t));
    if (thread == NULL) {
        printf ("calloc error so exit\n");
        exit (-1);
    }

    __atomic_store (&amp;glob, &amp;n, __ATOMIC_RELEASE);
    for (j = 0; j &lt; numThreads; j++) {
        s = pthread_create(&amp;thread[j], NULL, threadFunc, NULL);
        if (s != 0) {
            printf ("pthread_create failed so exit\n");
            exit (-1);
        }
    }

    for (j = 0; j &lt; numThreads; j++) {
        s = pthread_join(thread[j], NULL);
        if (s != 0) {
            printf ("pthread_join failed so exit\n");
            exit (-1);
        }
    }
    printf("glob value is %ld\n",__atomic_load_n (&amp;glob,__ATOMIC_RELAXED));

    exit(0);
}

   time ./thr_count 800 800000
   threads: 800; outer loops: 800000;
   glob value is 640000000

real	1m10.288s
user	0m57.269s
sys	3m31.565s

time ./thr_count_atomic 800 800000
     threads: 800; outer loops: 800000;
glob value is 640000000

real	0m20.313s
user	1m20.558s
sys	0m0.028

Change-Id: Ie5030a52ea264875e002e108dd4b207b15ab7cc7
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug/io-stats: Adding stat for weighted &amp; unweighted average latency</title>
<updated>2017-12-09T04:04:44+00:00</updated>
<author>
<name>Richard Wareing</name>
<email>rwareing@fb.com</email>
</author>
<published>2016-04-07T00:06:43+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aeff5def7e11de418d55f996926cbd5818c0494d'/>
<id>aeff5def7e11de418d55f996926cbd5818c0494d</id>
<content type='text'>
Summary:
- Our current approach to measuring "average fop latency" is badly
  flawed in that it doesn't weight the FOPs correctly according to how
  many occurred in the time interval.  This makes Statisticians very
  sad.  This patch adds an internally computed weighted average
  latency which will be far more efficient to display via ODS, as well
  as having the benefit of not being complete nonsense.

Reviewers: kvigor, dph, sshreyas

Reviewed By: sshreyas

Change-Id: Ie3618f279b545610b7ed1a8482243fcc8dc53217
BUG: 1523353
Reviewed-on: https://review.gluster.org/18192
Reviewed-by: Shreyas Siravara &lt;sshreyas@fb.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Signed-off-by: Ana M. Neri &lt;amnerip@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
- Our current approach to measuring "average fop latency" is badly
  flawed in that it doesn't weight the FOPs correctly according to how
  many occurred in the time interval.  This makes Statisticians very
  sad.  This patch adds an internally computed weighted average
  latency which will be far more efficient to display via ODS, as well
  as having the benefit of not being complete nonsense.

Reviewers: kvigor, dph, sshreyas

Reviewed By: sshreyas

Change-Id: Ie3618f279b545610b7ed1a8482243fcc8dc53217
BUG: 1523353
Reviewed-on: https://review.gluster.org/18192
Reviewed-by: Shreyas Siravara &lt;sshreyas@fb.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Signed-off-by: Ana M. Neri &lt;amnerip@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: specify ctx in gf_log_set_loglevel</title>
<updated>2017-12-06T23:45:23+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2017-12-05T04:45:46+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=28202631fecbc3b20a55cfc5fa339663db37e955'/>
<id>28202631fecbc3b20a55cfc5fa339663db37e955</id>
<content type='text'>
specify ctx in gf_log_set_loglevel, instead of getting it from a thread
specific variable.

Change-Id: I498f826e8e32231235a6b0005026a27c327727fd
BUG: 1521213
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
specify ctx in gf_log_set_loglevel, instead of getting it from a thread
specific variable.

Change-Id: I498f826e8e32231235a6b0005026a27c327727fd
BUG: 1521213
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "debug/io-stats: Append stats for each interval in the same file"</title>
<updated>2017-11-20T18:33:52+00:00</updated>
<author>
<name>cholcombe973</name>
<email>cholcombe973@review.gluster.org</email>
</author>
<published>2017-11-15T19:28:05+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aaef7e0d214b94a798b727af125006d07335b53c'/>
<id>aaef7e0d214b94a798b727af125006d07335b53c</id>
<content type='text'>
This reverts commit fc73ae5f81ef5926e3dc2311db116250d0f2a321.
See bug: https://bugzilla.redhat.com/show_bug.cgi?id=1513692

Change-Id: I00d5989b042d4e345621c596d5370d324948557f
Bug: 1513692
Signed-off-by: Chris Holcombe &lt;xfactor973@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit fc73ae5f81ef5926e3dc2311db116250d0f2a321.
See bug: https://bugzilla.redhat.com/show_bug.cgi?id=1513692

Change-Id: I00d5989b042d4e345621c596d5370d324948557f
Bug: 1513692
Signed-off-by: Chris Holcombe &lt;xfactor973@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
