All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [RFC] ocfs2: Idea to make ocfs2_search_chain high efficiency
@ 2015-08-24 12:30 Norton.Zhu
  2015-08-24 16:57 ` Srinivas Eeda
  2015-08-25 18:49 ` Tariq Saeed
  0 siblings, 2 replies; 5+ messages in thread
From: Norton.Zhu @ 2015-08-24 12:30 UTC (permalink / raw)
  To: ocfs2-devel

In ocfs2_search_chain, I found it has low efficiency  while searching an available gd in some circumstances:
1) The lun has a great many gd(it reads lots of unavailable gd(free bits is zero));
2) Not too many gd, but the available gd is scattered in the unavailable gd(fragmentation);

So I have an idea to optimize the search method:
1) Use the reserved member in the ocfs2_group_desc to make an available chain list(gds in the list are all available, free bits more than zero);
2) At the beginning, the chain list is the same with origin chain list;
3) While do allocation, it searches gd in the available chain list;
4) After each allocation, if some gd's free bits is zero, Remove it from the available chain list;
5) After each reclaim, if some gd's free bits change from zero to positive, Append it to the head of the available chain list;

Once started with the basics outlined above, no unavailable gd will be read.

Anyone has better ideas or advices?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-25 18:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 12:30 [Ocfs2-devel] [RFC] ocfs2: Idea to make ocfs2_search_chain high efficiency Norton.Zhu
2015-08-24 16:57 ` Srinivas Eeda
2015-08-25  1:47   ` Joel Becker
2015-08-25 12:08     ` Norton.Zhu
2015-08-25 18:49 ` Tariq Saeed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.