<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/9p, branch v4.20</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-09-07T16:39:47Z</updated>
<entry>
<title>9p: Add refcount to p9_req_t</title>
<updated>2018-09-07T16:39:47Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-08-14T17:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=728356dedeff8ef999cb436c71333ef4ac51a81c'/>
<id>urn:sha1:728356dedeff8ef999cb436c71333ef4ac51a81c</id>
<content type='text'>
To avoid use-after-free(s), use a refcount to keep track of the
usable references to any instantiated struct p9_req_t.

This commit adds p9_req_put(), p9_req_get() and p9_req_try_get() as
wrappers to kref_put(), kref_get() and kref_get_unless_zero().
These are used by the client and the transports to keep track of
valid requests' references.

p9_free_req() is added back and used as callback by kref_put().

Add SLAB_TYPESAFE_BY_RCU as it ensures that the memory freed by
kmem_cache_free() will not be reused for another type until the rcu
synchronisation period is over, so an address gotten under rcu read
lock is safe to inc_ref() without corrupting random memory while
the lock is held.

Link: http://lkml.kernel.org/r/1535626341-20693-1-git-send-email-asmadeus@codewreck.org
Co-developed-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+467050c1ce275af2a5b8@syzkaller.appspotmail.com
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: add a per-client fcall kmem_cache</title>
<updated>2018-09-07T16:39:47Z</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-07-30T06:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91a76be37ff89795526c452a6799576b03bec501'/>
<id>urn:sha1:91a76be37ff89795526c452a6799576b03bec501</id>
<content type='text'>
Having a specific cache for the fcall allocations helps speed up
end-to-end latency.

The caches will automatically be merged if there are multiple caches
of items with the same size so we do not need to try to share a cache
between different clients of the same size.

Since the msize is negotiated with the server, only allocate the cache
after that negotiation has happened - previous allocations or
allocations of different sizes (e.g. zero-copy fcall) are made with
kmalloc directly.

Some figures on two beefy VMs with Connect-IB (sriov) / trans=rdma,
with ior running 32 processes in parallel doing small 32 bytes IOs:
 - no alloc (4.18-rc7 request cache): 65.4k req/s
 - non-power of two alloc, no patch: 61.6k req/s
 - power of two alloc, no patch: 62.2k req/s
 - non-power of two alloc, with patch: 64.7k req/s
 - power of two alloc, with patch: 65.1k req/s

Link: http://lkml.kernel.org/r/1532943263-24378-2-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Acked-by: Jun Piao &lt;piaojun@huawei.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Greg Kurz &lt;groug@kaod.org&gt;
</content>
</entry>
<entry>
<title>9p: embed fcall in req to round down buffer allocs</title>
<updated>2018-09-07T16:39:45Z</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-07-30T05:55:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=523adb6cc10b48655c0abe556505240741425b49'/>
<id>urn:sha1:523adb6cc10b48655c0abe556505240741425b49</id>
<content type='text'>
'msize' is often a power of two, or at least page-aligned, so avoiding
an overhead of two dozen bytes for each allocation will help the
allocator do its work and reduce memory fragmentation.

Link: http://lkml.kernel.org/r/1533825236-22896-1-git-send-email-asmadeus@codewreck.org
Suggested-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Acked-by: Jun Piao &lt;piaojun@huawei.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>9p: Remove p9_idpool</title>
<updated>2018-08-29T04:39:57Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-07-11T21:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6348b903d79119a8157aace08ab99521f5dba139'/>
<id>urn:sha1:6348b903d79119a8157aace08ab99521f5dba139</id>
<content type='text'>
There are no more users left of the p9_idpool; delete it.

Link: http://lkml.kernel.org/r/20180711210225.19730-7-willy@infradead.org
Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Ron Minnich &lt;rminnich@sandia.gov&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: Use a slab for allocating requests</title>
<updated>2018-08-29T04:39:57Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-07-11T21:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=996d5b4db4b191f2676cf8775565cab8a5e2753b'/>
<id>urn:sha1:996d5b4db4b191f2676cf8775565cab8a5e2753b</id>
<content type='text'>
Replace the custom batch allocation with a slab.  Use an IDR to store
pointers to the active requests instead of an array.  We don't try to
handle P9_NOTAG specially; the IDR will happily shrink all the way back
once the TVERSION call has completed.

Link: http://lkml.kernel.org/r/20180711210225.19730-6-willy@infradead.org
Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Ron Minnich &lt;rminnich@sandia.gov&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: Embed wait_queue_head into p9_req_t</title>
<updated>2018-08-13T00:21:44Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-07-11T21:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2557d0c57c0c11af915d0d4d97402527958c0c01'/>
<id>urn:sha1:2557d0c57c0c11af915d0d4d97402527958c0c01</id>
<content type='text'>
On a 64-bit system, the wait_queue_head_t is 24 bytes while the pointer
to it is 8 bytes.  Growing the p9_req_t by 16 bytes is better than
performing a 24-byte memory allocation.

Link: http://lkml.kernel.org/r/20180711210225.19730-5-willy@infradead.org
Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Ron Minnich &lt;rminnich@sandia.gov&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: Replace the fidlist with an IDR</title>
<updated>2018-08-13T00:21:44Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-07-11T21:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f28cdf0430fc92acaa718e15598bdad6cb236a4d'/>
<id>urn:sha1:f28cdf0430fc92acaa718e15598bdad6cb236a4d</id>
<content type='text'>
The p9_idpool being used to allocate the IDs uses an IDR to allocate
the IDs ... which we then keep in a doubly-linked list, rather than in
the IDR which allocated them.  We can use an IDR directly which saves
two pointers per p9_fid, and a tiny memory allocation per p9_client.

Link: http://lkml.kernel.org/r/20180711210225.19730-4-willy@infradead.org
Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Ron Minnich &lt;rminnich@sandia.gov&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: Implement show_options</title>
<updated>2017-07-11T10:08:58Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2017-07-05T15:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4fac9100456995c10b65c13be84554258ed7fc8'/>
<id>urn:sha1:c4fac9100456995c10b65c13be84554258ed7fc8</id>
<content type='text'>
Implement the show_options superblock op for 9p as part of a bid to get
rid of s_options and generic_show_options() to make it easier to implement
a context-based mount where the mount options can be passed individually
over a file descriptor.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
cc: Ron Minnich &lt;rminnich@sandia.gov&gt;
cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
cc: v9fs-developer@lists.sourceforge.net
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>9p: constify -&gt;d_name handling</title>
<updated>2017-01-12T09:01:17Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-01-12T09:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7880b43bdfc9580700ee4568c75c383a5bcdd2ca'/>
<id>urn:sha1:7880b43bdfc9580700ee4568c75c383a5bcdd2ca</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>9p: switch p9_client_read() to passing struct iov_iter *</title>
<updated>2015-04-12T02:28:27Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-04-02T03:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1200fe68f20759f359698f8a8dc81d06d1265f5'/>
<id>urn:sha1:e1200fe68f20759f359698f8a8dc81d06d1265f5</id>
<content type='text'>
... and make it loop

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
