<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src/iobuf.c, branch release-8</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>libglusterfs-options: structure logging</title>
<updated>2020-02-09T02:53:40+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-11-23T08:33:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f1e62e1578ee07802827121722d90c1ec4b811a6'/>
<id>f1e62e1578ee07802827121722d90c1ec4b811a6</id>
<content type='text'>
convert all gf_msg() to gf_smsg()

Change-Id: I8f1ff462b9c8012ed676c51450930a65ac403bf3
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert all gf_msg() to gf_smsg()

Change-Id: I8f1ff462b9c8012ed676c51450930a65ac403bf3
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iobuf.c, h: minor fixes</title>
<updated>2019-11-07T08:30:24+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-02T05:13:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1de29634e5e74610570fe6f378a994bdf65c34cb'/>
<id>1de29634e5e74610570fe6f378a994bdf65c34cb</id>
<content type='text'>
- Align structures
- gf_iobuf_get_pagesize() will now also return the index, reducing the need
for an additional very similar call.
- Removal of an inefficient loop I've inadvertently added previously.
It was harmless, but just inefficient.
- New pool initialization does not need to be done under lock - no
one can touch that pool yet, so no need to protect it.

Change-Id: I61c50f2f14fa79edc131e515e9615a9928ee2dca
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Align structures
- gf_iobuf_get_pagesize() will now also return the index, reducing the need
for an additional very similar call.
- Removal of an inefficient loop I've inadvertently added previously.
It was harmless, but just inefficient.
- New pool initialization does not need to be done under lock - no
one can touch that pool yet, so no need to protect it.

Change-Id: I61c50f2f14fa79edc131e515e9615a9928ee2dca
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "iobuf: Get rid of pre allocated iobuf_pool and use per thread mem pool"</title>
<updated>2019-01-08T11:16:03+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-01-04T07:04:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=37653efdc7681d1b0f255054ec2f9c9ddd4c8b14'/>
<id>37653efdc7681d1b0f255054ec2f9c9ddd4c8b14</id>
<content type='text'>
This reverts commit b87c397091bac6a4a6dec4e45a7671fad4a11770.

There seems to be some performance regression with the patch and hence recommended to have it reverted.

Updates: #325
Change-Id: Id85d6203173a44fad6cf51d39b3e96f37afcec09
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit b87c397091bac6a4a6dec4e45a7671fad4a11770.

There seems to be some performance regression with the patch and hence recommended to have it reverted.

Updates: #325
Change-Id: Id85d6203173a44fad6cf51d39b3e96f37afcec09
</pre>
</div>
</content>
</entry>
<entry>
<title>iobuf: Get rid of pre allocated iobuf_pool and use per thread mem pool</title>
<updated>2018-12-18T09:35:24+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2018-11-21T06:39:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b87c397091bac6a4a6dec4e45a7671fad4a11770'/>
<id>b87c397091bac6a4a6dec4e45a7671fad4a11770</id>
<content type='text'>
The current implementation of iobuf_pool has two problems:
- prealloc of 12.5MB memory, this limits the scale factor of the gluster
  processes due to RAM requirements
- lock contention, as the current implementation has one global
  iobuf_pool lock. Credits for debugging and addressing the same goes to
  Krutika Dhananjay &lt;kdhananj@redhat.com&gt;. Issue: #410

Hence changing the iobuf implementation to use per thread mem pool.
This may theoritically appear to cause perf dip as there is no preallocation.
But per thread mem pool will not have significant perf impact as the last
allocated memory is kept alive for subsequent allocs, for some time.
The worst case would be if iobufs requested are of random sizes each time.
The best case is, if we get iobuf request of the same size. From the perf
tests, this patch did not seem to cause any perf decrease.

Note that, with this patch, the rdma performance is going to degrade
drastically. In one of the previous patchsets we had fixes to not
degrade rdma perf, but rdma is not supported and also not tested [1].
Hence the decision was to not have code in rdma that is not tested
and not supported.

[1] https://lists.gluster.org/pipermail/gluster-users.old/2018-July/034400.html

Updates: #325
Change-Id: Ic2ef3bd498f9250dea25f25ba0c01fde19584b27
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current implementation of iobuf_pool has two problems:
- prealloc of 12.5MB memory, this limits the scale factor of the gluster
  processes due to RAM requirements
- lock contention, as the current implementation has one global
  iobuf_pool lock. Credits for debugging and addressing the same goes to
  Krutika Dhananjay &lt;kdhananj@redhat.com&gt;. Issue: #410

Hence changing the iobuf implementation to use per thread mem pool.
This may theoritically appear to cause perf dip as there is no preallocation.
But per thread mem pool will not have significant perf impact as the last
allocated memory is kept alive for subsequent allocs, for some time.
The worst case would be if iobufs requested are of random sizes each time.
The best case is, if we get iobuf request of the same size. From the perf
tests, this patch did not seem to cause any perf decrease.

Note that, with this patch, the rdma performance is going to degrade
drastically. In one of the previous patchsets we had fixes to not
degrade rdma perf, but rdma is not supported and also not tested [1].
Hence the decision was to not have code in rdma that is not tested
and not supported.

[1] https://lists.gluster.org/pipermail/gluster-users.old/2018-July/034400.html

Updates: #325
Change-Id: Ic2ef3bd498f9250dea25f25ba0c01fde19584b27
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: Move devel headers under glusterfs directory</title>
<updated>2018-12-05T21:47:04+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-11-29T19:08:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5'/>
<id>20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5</id>
<content type='text'>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/iobuf.c: small refactor to re-use code.</title>
<updated>2018-12-05T03:59:29+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-07T08:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f80d9be732042477fc08ceb5873cd903002d7d1a'/>
<id>f80d9be732042477fc08ceb5873cd903002d7d1a</id>
<content type='text'>
No functional changes (I hope).
Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ifbec21c18a6dbe27c5271db156bff4d30ca85dbf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional changes (I hope).
Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ifbec21c18a6dbe27c5271db156bff4d30ca85dbf
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/iobuf.c: don't forget to unlock a mutex</title>
<updated>2018-11-06T16:33:36+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-06T16:18:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d76611fbba18d3120ac59f8f127981d0c950962a'/>
<id>d76611fbba18d3120ac59f8f127981d0c950962a</id>
<content type='text'>
commit ed83a4ee7b73e6b04694d1ac11ed25d2983ac943 changed locking
order and forgot to unlock in a negative path (when index was -1).
Coverity caught it (thanks!) as  CID 1396581:  Program hangs  (LOCK)

Note: I'm unlocking before logging the failure. I think it's the right
order - logging can take a while (especially if your disk is slow).

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I82ac241edf1d511bf6807cf9c46c538ab9f4acc4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ed83a4ee7b73e6b04694d1ac11ed25d2983ac943 changed locking
order and forgot to unlock in a negative path (when index was -1).
Coverity caught it (thanks!) as  CID 1396581:  Program hangs  (LOCK)

Note: I'm unlocking before logging the failure. I think it's the right
order - logging can take a while (especially if your disk is slow).

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I82ac241edf1d511bf6807cf9c46c538ab9f4acc4
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/iobuf.c: where possible, pass the index parameter</title>
<updated>2018-11-06T04:18:50+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-04T14:17:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=258db7178663305c26aa0068d4f72159ff0bc3ba'/>
<id>258db7178663305c26aa0068d4f72159ff0bc3ba</id>
<content type='text'>
Don't 'calculate' again where it can be passed.
If possible, do not perform under lock.

Also remove some NULL checks, assuming they were done by the callers.
Left a remark for each such change.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ia5c2851506da3388cb2d4445334c58881e2c4416
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't 'calculate' again where it can be passed.
If possible, do not perform under lock.

Also remove some NULL checks, assuming they were done by the callers.
Left a remark for each such change.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ia5c2851506da3388cb2d4445334c58881e2c4416
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/iobuf.c: take the pool lock once in new pool</title>
<updated>2018-11-06T04:18:50+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-04T11:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=ed83a4ee7b73e6b04694d1ac11ed25d2983ac943'/>
<id>ed83a4ee7b73e6b04694d1ac11ed25d2983ac943</id>
<content type='text'>
When creating a new pool, take the pool lock once and create
all arenas, instead of taking and releasing for each arena.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I7daa39de960e47e66a32ecab724cf3a61ccdc01b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a new pool, take the pool lock once and create
all arenas, instead of taking and releasing for each arena.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I7daa39de960e47e66a32ecab724cf3a61ccdc01b
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/iobuf.c: remove some if statements</title>
<updated>2018-11-06T04:18:50+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-04T09:00:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=ba52abc6931baecb73d690b289f8feb32205424f'/>
<id>ba52abc6931baecb73d690b289f8feb32205424f</id>
<content type='text'>
Small code refactoring to remove some if statements
in several functions. No functional changes expected.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: If9f8d5d53c9688fb994b6d690aea66f65fa01c55
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Small code refactoring to remove some if statements
in several functions. No functional changes expected.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: If9f8d5d53c9688fb994b6d690aea66f65fa01c55
</pre>
</div>
</content>
</entry>
</feed>
