Blame SOURCES/kvm-ahci-don-t-schedule-unnecessary-BH.patch

383d26
From 80d7419e93a1195b46c6c917b4533ca440c12c82 Mon Sep 17 00:00:00 2001
383d26
From: John Snow <jsnow@redhat.com>
383d26
Date: Tue, 10 Jul 2018 23:06:16 +0200
383d26
Subject: [PATCH 33/89] ahci: don't schedule unnecessary BH
383d26
383d26
RH-Author: John Snow <jsnow@redhat.com>
383d26
Message-id: <20180710230616.11000-4-jsnow@redhat.com>
383d26
Patchwork-id: 81292
383d26
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 3/3] ahci: don't schedule unnecessary BH
383d26
Bugzilla: 1584914
383d26
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
383d26
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
383d26
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
383d26
383d26
The comment gives us a hint. *Maybe* we still have something to
383d26
process. Well, why not check?
383d26
383d26
Signed-off-by: John Snow <jsnow@redhat.com>
383d26
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
383d26
Reviewed-by: Jeff Cody <jcody@redhat.com>
383d26
Message-id: 20180531004323.4611-4-jsnow@redhat.com
383d26
Signed-off-by: John Snow <jsnow@redhat.com>
383d26
(cherry picked from commit 42af312adef8afdae11d5f83d12a404b178dbda4)
383d26
Signed-off-by: John Snow <jsnow@redhat.com>
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
---
383d26
 hw/ide/ahci.c | 3 +--
383d26
 1 file changed, 1 insertion(+), 2 deletions(-)
383d26
383d26
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
383d26
index a9558e4..380366b 100644
383d26
--- a/hw/ide/ahci.c
383d26
+++ b/hw/ide/ahci.c
383d26
@@ -1427,8 +1427,7 @@ static void ahci_cmd_done(IDEDMA *dma)
383d26
     /* update d2h status */
383d26
     ahci_write_fis_d2h(ad);
383d26
 
383d26
-    if (!ad->check_bh) {
383d26
-        /* maybe we still have something to process, check later */
383d26
+    if (ad->port_regs.cmd_issue && !ad->check_bh) {
383d26
         ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad);
383d26
         qemu_bh_schedule(ad->check_bh);
383d26
     }
383d26
-- 
383d26
1.8.3.1
383d26