lkml.org 
[lkml]   [2018]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t
Greg Kurz wrote on Thu, Jul 12, 2018:
> This is true when all tags have been used at least once. But the current code
> lazily allocates the wait_queue_head_t, ie, only when a tag is used for the
> first time. Your patch causes a full row of wait_quest_head_t to be pre-allocated.
>
> ie, P9_ROW_MAXTAG * 24 = 255 * 24 = 6120
>
> instead of (P9_ROW_MAXTAG * 8) + 24 = 255 * 8 + 24 = 2064
>
> This is nearly a page of allocated memory that might be never used.
>
> Not sure if this is a problem though...

I thought the exact same, but the next patch in the serie removes that
array and allocates even more lazily with a slab, so this was a
no-brainer :)

--
Dominique Martinet
\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.081 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site