fbdev: Don't sort deferred-I/O pages by default
Fbdev's deferred I/O sorts all dirty pages by default, which incurs a significant overhead. Make the sorting step optional and update the few drivers that require it. Use a FIFO list by default. Most fbdev drivers with deferred I/O build a bounding rectangle around the dirty pages or simply flush the whole screen. The only two affected DRM drivers, generic fbdev and vmwgfx, both use a bounding rectangle. In those cases, the exact order of the pages doesn't matter. The other drivers look at the page index or handle pages one-by-one. The patch sets the sort_pagelist flag for those, even though some of them would probably work correctly without sorting. Driver maintainers should update their driver accordingly. Sorting pages by memory offset for deferred I/O performs an implicit bubble-sort step on the list of dirty pages. The algorithm goes through the list of dirty pages and inserts each new page according to its index field. Even worse, list traversal alwa...
Showing
- drivers/staging/fbtft/fbtft-core.c 1 addition, 0 deletionsdrivers/staging/fbtft/fbtft-core.c
- drivers/video/fbdev/broadsheetfb.c 1 addition, 0 deletionsdrivers/video/fbdev/broadsheetfb.c
- drivers/video/fbdev/core/fb_defio.c 17 additions, 7 deletionsdrivers/video/fbdev/core/fb_defio.c
- drivers/video/fbdev/metronomefb.c 1 addition, 0 deletionsdrivers/video/fbdev/metronomefb.c
- drivers/video/fbdev/udlfb.c 1 addition, 0 deletionsdrivers/video/fbdev/udlfb.c
- include/linux/fb.h 1 addition, 0 deletionsinclude/linux/fb.h
Please register or sign in to comment