Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp396414pxb; Wed, 24 Feb 2021 05:18:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLD/gdgTQ5r/uzHmTwMnaCTEn2CEr36UGLvTvHA8PeSaleY/FWiX2MUUByi7hFQtA1J5FY X-Received: by 2002:aa7:c3c7:: with SMTP id l7mr7585264edr.207.1614172714983; Wed, 24 Feb 2021 05:18:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614172714; cv=none; d=google.com; s=arc-20160816; b=FNznDCrQ2ovL1WPCSR3Ox/NbJs7joIw/tgeiU5bAC74lkok/GriEkdLnQfRO2Nqgli C7daHGYpGQ447nJgU6ElmBws3PQ6rkzQfJs+xQBJPV4u/BuKSHlKbHGdJ8cyRC32D8ma JBNfc7V7JZEoPdOeEFUyh2zYlJ5dNIv9oMEavbr00HSSpzLR+v8kj+GENeBMbcomXTUD WHuww2cN21femts8UidrKFZtYNJViOcVeujFOSLWcv/h4Rchz939r4PBhpfjO3IUPQrA sQ73Ar/t3N+NwRrkEYNG0RizEaFkynC2DypiUtO7QcA10ufumMBjhPAdSsDbsbeTwjQY CJbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lEheRsNzM6A5FEWZatOgOB06QRFT+dQp09C3//0tehA=; b=suL1A5H1SBIvB0eb3hwZ/kF/y1iZ0sHSD98KjiBVL+nHbnIkjs+9WK4iT4mGHP0ZVJ FKP1iXhaTwGnN5HvxA+Ij3ddvxjJfP5J4nWtQJlX6flwDQoYiGjmc4rPpX96u1LO/YNJ kUluhCNf7ycKa/N0iLLp9R9jB6VbCCy/+e4wtfXh0LgTmmVLQW3fmO/t+FbQ2NToAhu+ 4sn76tkSMLQfMjQbBDiDP0f2wEN+xUX7vKMqjGbYOm+lXyv+/0KJPNB/ubJvpX5AN8zv j5HUxZBun4ylKCvTvVe2TD+akPWEkNmSjsCz35EmFp/fWwoeevMUpPlOzaf/K8m59bT1 /IAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K9gUQlO7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si1265832ejk.262.2021.02.24.05.17.23; Wed, 24 Feb 2021 05:18:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K9gUQlO7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231721AbhBXMZd (ORCPT + 99 others); Wed, 24 Feb 2021 07:25:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231274AbhBXMZb (ORCPT ); Wed, 24 Feb 2021 07:25:31 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DDF8C061574; Wed, 24 Feb 2021 04:24:51 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id f6so1752048iop.11; Wed, 24 Feb 2021 04:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lEheRsNzM6A5FEWZatOgOB06QRFT+dQp09C3//0tehA=; b=K9gUQlO70bOvYAFnPmmIzKwJHE9HGNz+lWqbfQIlQWkzlGyzkx7MbH3/LFlirAIr/X bpG20WropIRA8MpivD+QF/avfmwtisGDteD02UJS2MzfMZfRxAOSmJ5d85g3g3lcc2DI lTRl3R/CfKUm8OgtY2NSlGLYGds6Qu3110gfGsnrwdZP4D/dpwF2foK1/9vGs6/vDdPy uKfLjvJPUNxFU8rSREBxjw+D+hmqExmky5mWO9qp1woaR3TUU+pWzINCPzo3IqRhqzqC LI4bNUUAPtNF14cAvcHoBVsc+uJu8NTHu43jGeR1f2W2QVLJUK7pQ7Z8DIrJtiTy5pwu fnvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lEheRsNzM6A5FEWZatOgOB06QRFT+dQp09C3//0tehA=; b=cX0WcNF2T9PM3e6kbj0yVQJIlvJEZsCyRjhXK5E1/CJ5q02QRTYRzO4khbvyvbzjBV 84SaFrODW9i8mB1wLhCwdxt6akPVcFHJ7gn3SxrgFtJTaqq+MiUagH3ZIuIjazZRbdyE jjwAfg7C4rXdXUy1GH0TrNfVXSaFbpqZIKLxhXmn46Fu7j0RvQw7zYRGRUZMP+o0rT0+ 3CwNhtrJ6PKMnlx7kCn+iOIrdAw0D0SVfXp6ADIoadiab/2VPn6sLBIK/HIStuCckA+l 3lCoAtmwLZn+oSMovkBpzA3V1KVi74/uKJp2zPUvrOKszKslqPMm7Y9tX3w4+L4/lJfe IWxQ== X-Gm-Message-State: AOAM533Ih2hly+g4bmL/lcGjlTj3j6spJVv9UKz7kwhX9CfCHa1CSAjX u43SWqE1+5YqwaxGkpjj06KqKU0C8mvwb8nQRpM= X-Received: by 2002:a6b:5818:: with SMTP id m24mr2267566iob.144.1614169490732; Wed, 24 Feb 2021 04:24:50 -0800 (PST) MIME-Version: 1.0 References: <20210220230248.320870-1-ztong0001@gmail.com> In-Reply-To: From: Tong Zhang Date: Wed, 24 Feb 2021 07:24:40 -0500 Message-ID: Subject: Re: [PATCH] video: fbdev: pm2fb: avoid stall on fb_sync To: Geert Uytterhoeven Cc: Randy Dunlap , "Gustavo A. R. Silva" , Sam Ravnborg , Bartlomiej Zolnierkiewicz , DRI Development , Linux Fbdev development list , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, IMHO - QEMU is irrelevant here. since I can do passthrough -- in fact -- many drivers do use timeout in .fb_sync e.g. i810fb_sync(), nouveau_fbcon_sync(), sm501fb_sync() etc.. I believe the correct behaviour should be a timeout wait instead of waiting indefinitely. - Tong On Wed, Feb 24, 2021 at 6:35 AM Geert Uytterhoeven wrote: > > Hi Tong, > > On Sun, Feb 21, 2021 at 1:05 AM Tong Zhang wrote: > > On Sat, Feb 20, 2021 at 6:33 PM Randy Dunlap wrote: > > > On 2/20/21 3:02 PM, Tong Zhang wrote: > > > > pm2fb_sync is called when doing /dev/fb read or write. > > > > The original pm2fb_sync wait indefinitely on hardware flags which can > > > > possibly stall kernel and make everything unresponsive. > > > > Instead of waiting indefinitely, we can timeout to give user a chance to > > > > get back control. > > > > > > Is this a real problem or theoretical? > > > Does someone still use this driver? > > > > I currently have this problem on my machine. > > I have submitted a revised patch -- which includes the console log. > > Your machine is "QEMU Standard"? > Can this happen on real hardware, too, or is this a deficiency in QEMU, > which should be fixed there? > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds