Skip to content

Commit

Permalink
9p: embed fcall in req to round down buffer allocs
Browse files Browse the repository at this point in the history
'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/[email protected]
Suggested-by: Matthew Wilcox <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Acked-by: Jun Piao <[email protected]>
Cc: Matthew Wilcox <[email protected]>
  • Loading branch information
Dominique Martinet committed Sep 7, 2018
1 parent 6348b90 commit 523adb6
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 118 deletions.
5 changes: 3 additions & 2 deletions include/net/9p/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ struct p9_req_t {
int status;
int t_err;
wait_queue_head_t wq;
struct p9_fcall *tc;
struct p9_fcall *rc;
struct p9_fcall tc;
struct p9_fcall rc;
void *aux;
struct list_head req_list;
};
Expand Down Expand Up @@ -230,6 +230,7 @@ int p9_client_mkdir_dotl(struct p9_fid *fid, const char *name, int mode,
kgid_t gid, struct p9_qid *);
int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *fl);
void p9_fcall_fini(struct p9_fcall *fc);
struct p9_req_t *p9_tag_lookup(struct p9_client *, u16);
void p9_client_cb(struct p9_client *c, struct p9_req_t *req, int status);

Expand Down
Loading

0 comments on commit 523adb6

Please sign in to comment.