[Devel] [PATCH RHEL7 COMMIT] fbcon: use kvmalloc() for scrollback buffer

Konstantin Khorenko khorenko at virtuozzo.com
Tue Nov 20 12:20:17 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.6
------>
commit e60259bd950c2a51eabcb155bb4ca400852fa528
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Mon Nov 19 18:14:53 2018 +0300

    fbcon: use kvmalloc() for scrollback buffer
    
    Scrollback frame buffer is rather big - 32K,
    so it requires 3rd order page, so let's use kvmalloc() instead of
    ordinary kmalloc() for it.
    
    https://pmc.acronis.com/browse/VSTOR-17781
    https://jira.sw.ru/browse/HCI-188
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 drivers/video/console/fbcon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index e409686abee9..dbbf049956e3 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -993,7 +993,7 @@ static const char *fbcon_startup(void)
 			if (!softback_buf) {
 				softback_buf =
 				    (unsigned long)
-				    kmalloc(fbcon_softback_size,
+				    kvmalloc(fbcon_softback_size,
 					    GFP_KERNEL);
 				if (!softback_buf) {
 					fbcon_softback_size = 0;
@@ -1002,7 +1002,7 @@ static const char *fbcon_startup(void)
 			}
 		} else {
 			if (softback_buf) {
-				kfree((void *) softback_buf);
+				kvfree((void *) softback_buf);
 				softback_buf = 0;
 				softback_top = 0;
 			}
@@ -3551,7 +3551,7 @@ static void fbcon_exit(void)
 	if (fbcon_has_exited)
 		return;
 
-	kfree((void *)softback_buf);
+	kvfree((void *)softback_buf);
 	softback_buf = 0UL;
 
 	for (i = 0; i < FB_MAX; i++) {



More information about the Devel mailing list