From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AA78C636C9 for ; Fri, 16 Jul 2021 02:26:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38CC3613E0 for ; Fri, 16 Jul 2021 02:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233239AbhGPC3d (ORCPT ); Thu, 15 Jul 2021 22:29:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33536 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbhGPC31 (ORCPT ); Thu, 15 Jul 2021 22:29:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626402391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HbfQj6sCW3EDzaZcinPsyqAoy710pIqDnhr0KpSvvyo=; b=KbCvt9lbGIy3zQmFBWjaAjablbl1gMuLKsCZZ91E/6d5T5UkefE/IHLOw+ZYQjxhN68z34 hZEr5YwNDglwkKbiGrq/vIPshLRHjWrjOzuuS+S6ULV8SDwBoNxN9QHC2Yy4z9/Xyd1tFd L08vPoEo1kmwff887F4aPDq5CSmMCKI= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-303-3RUF3qJdMryc3l1lZyE_4Q-1; Thu, 15 Jul 2021 22:26:29 -0400 X-MC-Unique: 3RUF3qJdMryc3l1lZyE_4Q-1 Received: by mail-pl1-f199.google.com with SMTP id z13-20020a170903408db0290129a6155d3cso1839310plc.2 for ; Thu, 15 Jul 2021 19:26:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=HbfQj6sCW3EDzaZcinPsyqAoy710pIqDnhr0KpSvvyo=; b=ZBMx8ET9Yli0tQQlDQRkeG1ROBEeQ6xURfROoPo2QTvcy+H1T1hjyPjOetn9i4OHKi KSPZog98Zu27pBCNIcLlt5SKsyxrU5RHBanhZCX+afVJvu5NQOmog5MN0X6pYhrmnvQb qSMYGULWyfsoCiZv4lMXhy3kkrl8DBysYdlxMg6za4BD/nwOfkel4r+HwawMNolY9is8 Mg9W+s/mA9ukvYkP5OCtyQEIaYSG/YeVwrV3gS98QmVsyenyEzvABS9It1Pa9TrlkPwI FpXq+QbUvZsXPBkFmES+BpVAZUHCnFeAvogaCRls8ETlIMlBU+dmZqaSXYb4I6JrcC9t n9yw== X-Gm-Message-State: AOAM530CRGdEHyIr2iRDhUFCT+nyaYRAHQA+B0kVRJVZHcyuYGN29q3t MWnIB5EzwWFbECU++cwDzLazNHxzKJhKdWaPdgQ8fJ5bWGzu96HCFDwf2HxRrDQxUYeobC4fFUI 01OLQ1L0Ol5WYUOzmNPbmAy6G X-Received: by 2002:a17:90a:fb93:: with SMTP id cp19mr7353879pjb.30.1626402388437; Thu, 15 Jul 2021 19:26:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX0bcNFkDpZ5ajYsknACKTJbRTnPfRZhY9VHcnpeunwTVGUdqogLFGId1P2B+eG6+/zDhfyg== X-Received: by 2002:a17:90a:fb93:: with SMTP id cp19mr7353857pjb.30.1626402388185; Thu, 15 Jul 2021 19:26:28 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id m21sm7931709pfo.159.2021.07.15.19.26.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jul 2021 19:26:27 -0700 (PDT) Subject: Re: 5.13-rt1 + KVM = WARNING: at fs/eventfd.c:74 eventfd_signal() To: Paolo Bonzini , He Zhe , Daniel Bristot de Oliveira , Thomas Gleixner , Sebastian Andrzej Siewior , "Michael S. Tsirkin" , Juri Lelli Cc: LKML , Al Viro , Xie Yongji References: <8dfc0ee9-b97a-8ca8-d057-31c8cad3f5b6@redhat.com> <475f84e2-78ee-1a24-ef57-b16c1f2651ed@redhat.com> From: Jason Wang Message-ID: <97704aa6-46eb-2462-a4d9-2bf93144a5ac@redhat.com> Date: Fri, 16 Jul 2021 10:26:18 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/7/15 下午7:05, Paolo Bonzini 写道: > On 15/07/21 12:10, He Zhe wrote: >> The following was provided in this thread. The commit log contains >> the call traces that I met and fixed back to Apr. 2020. >> >> https://lore.kernel.org/lkml/20210618084412.18257-1-zhe.he@windriver.com/ >> > >> 001: WARNING: CPU: 1 PID: 1503 at fs/eventfd.c:73 >> eventfd_signal+0x85/0xa0 >> ---- snip ---- >> 001: Call Trace: >> 001:  vhost_signal+0x15e/0x1b0 [vhost] >> 001:  vhost_add_used_and_signal_n+0x2b/0x40 [vhost] >> 001:  handle_rx+0xb9/0x900 [vhost_net] >> 001:  handle_rx_net+0x15/0x20 [vhost_net] >> 001:  vhost_worker+0xbe/0x120 [vhost] >> 001:  kthread+0x106/0x140 >> 001:  ? log_used.part.0+0x20/0x20 [vhost] >> 001:  ? kthread_park+0x90/0x90 >> 001:  ret_from_fork+0x35/0x40 > > This call trace is not of a reentrant call; there is only one call to > eventfd_signal.  It does fit the symptoms that Daniel reported for > PREEMPT_RT though. > >> https://lore.kernel.org/lkml/beac2025-2e11-8ed0-61e2-9f6e633482e8@redhat.com/ >> > > This one is about PREEMPT_RT, so it would be fixed by local_lock. > > There _may_ be two bugs, so let's start by fixing this one.  Once this > one is fixed, we will examine the call stacks of any further reports, > and diagnose whether the second bug (if it exists) is related to > vDUSE, PREEMPT_RT or neeither. For VDUSE we may still need the patch since it tries to relay notifications (eventfds) which means the recursion of the eventfd signal. But looking at the comment in the eventfd_signal() which say we should check with eventfd_signal_count() and delay the signal into a safe context (e.g workqueue etc). Thanks > > Paolo >