[PATCH v4 7/9] proc/kcore: optimize multiple page reads

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search.

[PATCH v4 7/9] proc/kcore: optimize multiple page reads

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search.