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

Submitted by Konstantin Khorenko on Nov. 20, 2018, 9:20 a.m.

Details

Message ID 201811200920.wAK9KFpu000673@finist-ce7.sw.ru
State New
Series "fbcon: use kvmalloc() for scrollback buffer"
Headers show

Commit Message

Konstantin Khorenko Nov. 20, 2018, 9:20 a.m.
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@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@virtuozzo.com>
---
 drivers/video/console/fbcon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

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++) {