Re: [PATCH] fbcon: use kvmalloc() for scrollback buffer
From: Bartlomiej Zolnierkiewicz
Date: Fri Feb 08 2019 - 12:02:23 EST
On 12/21/2018 11:58 AM, Konstantin Khorenko wrote:
> Hi Bartlomiej,
> On 12/20/2018 07:21 PM, Bartlomiej Zolnierkiewicz wrote:
>> On 11/26/2018 11:02 AM, Konstantin Khorenko wrote:
>>> Scrollback frame buffer is rather big - 32K,
>>> so it requires 3rd order page, so let's use kvmalloc() instead of
>>> ordinary kmalloc() for it.
>> Is it actually safe to use non-contiguous memory for softback_buf?
> Well, that's why we need a review. :)
> i've asked myself same question while fixing this,
> i've dig sources a bit and did not find places when softback_buf is provided for DMA,
> all other places seems to work with virtual addresses, so there should be no problem.
> Even more i saw a function which mentions that softback might be non-contigious:
> /* As we might be inside of softback, we may work with non-contiguous buffer,
> that's why we have to use a separate routine. */
> static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt)
> So i think it's safe to use kvmalloc() here.
Patch queued for v5.1, thanks.
Samsung R&D Institute Poland