Re: [PATCH] tty: vt: remove multi-fetch, derive font.height from font.data

2017-10-04 Thread Greg KH
On Wed, Oct 04, 2017 at 10:12:38AM -0400, Meng Xu wrote: > In con_font_set(), when we need to guess font height (for > compat reasons?), the current approach uses multiple userspace > fetches, i.e., get_user(tmp, &charmap[32*i+h-1]), to derive > the height. This has two drawbacks: > > 1. performan

[PATCH] tty: vt: remove multi-fetch, derive font.height from font.data

2017-10-04 Thread Meng Xu
In con_font_set(), when we need to guess font height (for compat reasons?), the current approach uses multiple userspace fetches, i.e., get_user(tmp, &charmap[32*i+h-1]), to derive the height. This has two drawbacks: 1. performance: accessing userspace memory is less efficient than directly de-ref

Re: [PATCH] tty: vt: remove multi-fetch, derive font.height from font.data

2017-10-04 Thread Greg KH
On Sun, Sep 24, 2017 at 12:59:42PM -0400, Meng Xu wrote: > In con_font_set(), when we need to guess font height (for > compat reasons?), the current approach uses multiple userspace > fetches, i.e., get_user(tmp, &charmap[32*i+h-1]), to derive > the height. This has two drawbacks: > > 1. performan

[PATCH] tty: vt: remove multi-fetch, derive font.height from font.data

2017-09-24 Thread Meng Xu
In con_font_set(), when we need to guess font height (for compat reasons?), the current approach uses multiple userspace fetches, i.e., get_user(tmp, &charmap[32*i+h-1]), to derive the height. This has two drawbacks: 1. performance: accessing userspace memory is less efficient than directly de-ref