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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 2D8B9C76188 for ; Mon, 22 Jul 2019 15:14:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0700C204FD for ; Mon, 22 Jul 2019 15:14:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="XQ0f5nx8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728240AbfGVPOn (ORCPT ); Mon, 22 Jul 2019 11:14:43 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:34396 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbfGVPOn (ORCPT ); Mon, 22 Jul 2019 11:14:43 -0400 Received: by mail-pg1-f179.google.com with SMTP id n9so11587647pgc.1 for ; Mon, 22 Jul 2019 08:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=i8M6AK4de9Ik8pIGK7ZSAo/fkLcx89Rz2FU4ueU7AtI=; b=XQ0f5nx8fa3pklvdGG2u9IOZZJTUyDUTYVVk+sNJ3SCJPR77BhV8NbHcipLbVy1xvT Slg0Se3QHTC0ZyO53T8oEMnYmpMj/IpwJ3J26/3ycCvlPIjGxwvchFbXcMJqk0o/mpqq 1Yt0CuEo1ILTMuVgHTe5nTzixjn08mjGXwYpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=i8M6AK4de9Ik8pIGK7ZSAo/fkLcx89Rz2FU4ueU7AtI=; b=T7Gbi7QjmVpCY6Gux9Um0cTlTttR+2IwZ7KPOFczvtfnZLQRHVJKtIfjFj4lvzWVlQ B88bsP2mjK8law1pidYU3KWAf0vZQncVKrtEecH/71578JxSGzFuUM0MClo3DrIYp3fN Hr9RfeSNAJr/1Wj6LZ1b4ZG7kr619okJ+eEoXe0Avg87dbBlhqYYSfKTcE9jXCcOQyCM p8rfXQH+JEY8bSGtzJ5WrTIyZhijyKuj4aq6JWn6nThrkZjQykmk8MyVkP8KCXAFC5Vx hVxzkm3SfFp0UQE+8S9/n1OvdYcy+N9iSEgzAIqqMOewCZGjEKpTRA5ovQjjR9PdfHIg HBpg== X-Gm-Message-State: APjAAAWwQysAmPYqUEXR+1/LJl0bDVdsELe7R4ncpqYIn5mII3hbsZpw 5KrIagLgn2ig8KaI1D12xxU= X-Google-Smtp-Source: APXvYqydSiyMRzj6QXFVzUWNzUL0LUUvnGotJgLD9n9VUjcgfggnl8W+/75TLlsXhUbwOLV6q6l9PQ== X-Received: by 2002:a63:1310:: with SMTP id i16mr71092692pgl.187.1563808481910; Mon, 22 Jul 2019 08:14:41 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id h1sm51944925pfg.55.2019.07.22.08.14.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:14:40 -0700 (PDT) Date: Mon, 22 Jul 2019 11:14:39 -0400 From: Joel Fernandes To: "Paul E. McKenney" Cc: Matthew Wilcox , "Michael S. Tsirkin" , aarcange@redhat.com, akpm@linux-foundation.org, christian@brauner.io, davem@davemloft.net, ebiederm@xmission.com, elena.reshetova@intel.com, guro@fb.com, hch@infradead.org, james.bottomley@hansenpartnership.com, jasowang@redhat.com, jglisse@redhat.com, keescook@chromium.org, ldv@altlinux.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, luto@amacapital.net, mhocko@suse.com, mingo@kernel.org, namit@vmware.com, peterz@infradead.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk, wad@chromium.org Subject: Re: RFC: call_rcu_outstanding (was Re: WARNING in __mmdrop) Message-ID: <20190722151439.GA247639@google.com> References: <0000000000008dd6bb058e006938@google.com> <000000000000964b0d058e1a0483@google.com> <20190721044615-mutt-send-email-mst@kernel.org> <20190721081933-mutt-send-email-mst@kernel.org> <20190721131725.GR14271@linux.ibm.com> <20190721210837.GC363@bombadil.infradead.org> <20190721233113.GV14271@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190721233113.GV14271@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org [snip] > > Would it make sense to have call_rcu() check to see if there are many > > outstanding requests on this CPU and if so process them before returning? > > That would ensure that frequent callers usually ended up doing their > > own processing. Other than what Paul already mentioned about deadlocks, I am not sure if this would even work for all cases since call_rcu() has to wait for a grace period. So, if the number of outstanding requests are higher than a certain amount, then you *still* have to wait for some RCU configurations for the grace period duration and cannot just execute the callback in-line. Did I miss something? Can waiting in-line for a grace period duration be tolerated in the vhost case? thanks, - Joel 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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 0B97EC76188 for ; Mon, 22 Jul 2019 15:16:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D473B204FD for ; Mon, 22 Jul 2019 15:16:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rYp+8Afo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="XQ0f5nx8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D473B204FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MIx4BAnD5iaCl2nJkKuHuss/aFcimseU8ZJt0FWYS6Q=; b=rYp+8Afo+L90si /IKGPwUMp+MvSAvBwRUZP8hSDLxP5awB9RwM3L9Qv45i/90LGpQhnFRALod8gUFY83NpsHug/wK05 lh7b+Q8StPx97VvGNp10+UV4kEiQdab95Wsk26/TzEOSWQlhRkrQoSuUWJOljSdlwSJ7K0LVOMYuZ Rc0a/HVuOdOUP63Fzu9IU9r//wVhrOL28t5qYiHyaSv/IhouG8YbaJH1SNMbM2BB4DzqOA01W7eAA aSze/M+im+gCF7jkkqGI8bhEnBQNLbamO84xzI5rpuJV3twTukSBy/SvUDtCndKqAlrUKhcZmZS43 iYRBvBip0NEoxP3SX+0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpa3N-0007UZ-AI; Mon, 22 Jul 2019 15:16:41 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpa1T-0005U4-Sd for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 15:14:59 +0000 Received: by mail-pf1-x434.google.com with SMTP id u14so17541110pfn.2 for ; Mon, 22 Jul 2019 08:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=i8M6AK4de9Ik8pIGK7ZSAo/fkLcx89Rz2FU4ueU7AtI=; b=XQ0f5nx8fa3pklvdGG2u9IOZZJTUyDUTYVVk+sNJ3SCJPR77BhV8NbHcipLbVy1xvT Slg0Se3QHTC0ZyO53T8oEMnYmpMj/IpwJ3J26/3ycCvlPIjGxwvchFbXcMJqk0o/mpqq 1Yt0CuEo1ILTMuVgHTe5nTzixjn08mjGXwYpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=i8M6AK4de9Ik8pIGK7ZSAo/fkLcx89Rz2FU4ueU7AtI=; b=DCdTkKBFXsAbThbIBjlguZIGB3tKc0+PZ7SiJbo+cdt8xZVk9/g0tOYUXkN7MT2GiO TrYn9pTbbyEqHQ6jq9hUPaeVWF5DOSWC/ATQ3DkhjnIFmw9cp5AFzi1pG5JCJV5nw1Ck WpnL8GWQliQmiMef476ITFPc5uKYftFgpv+Bz8h9rkU5HhfignWS9n3vhiUq19MxiDVM ioF7BeTjeOgpL/VIpFWkiWHzVjd1SKUQK9iHq5HgHSVxk+K85H+qB8vnqXu5HsnzjcYD 8FXBVWnb6QaJvPrMfjZDEGkEbAIE0vAQTVW8LbieTjEdknHLCKeO93e6mY6Ogjq+7B/t xXQQ== X-Gm-Message-State: APjAAAVQJvtwNlLJpK9RkmexW2djqKARrZ0QnXQd4zcWk0KHeCYLG3Gl OfHlsol8YXtVvBpevLKM9BM= X-Google-Smtp-Source: APXvYqydSiyMRzj6QXFVzUWNzUL0LUUvnGotJgLD9n9VUjcgfggnl8W+/75TLlsXhUbwOLV6q6l9PQ== X-Received: by 2002:a63:1310:: with SMTP id i16mr71092692pgl.187.1563808481910; Mon, 22 Jul 2019 08:14:41 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id h1sm51944925pfg.55.2019.07.22.08.14.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:14:40 -0700 (PDT) Date: Mon, 22 Jul 2019 11:14:39 -0400 From: Joel Fernandes To: "Paul E. McKenney" Subject: Re: RFC: call_rcu_outstanding (was Re: WARNING in __mmdrop) Message-ID: <20190722151439.GA247639@google.com> References: <0000000000008dd6bb058e006938@google.com> <000000000000964b0d058e1a0483@google.com> <20190721044615-mutt-send-email-mst@kernel.org> <20190721081933-mutt-send-email-mst@kernel.org> <20190721131725.GR14271@linux.ibm.com> <20190721210837.GC363@bombadil.infradead.org> <20190721233113.GV14271@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190721233113.GV14271@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_081445_729927_34977AFC X-CRM114-Status: UNSURE ( 8.07 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mhocko@suse.com, "Michael S. Tsirkin" , peterz@infradead.org, jasowang@redhat.com, ldv@altlinux.org, james.bottomley@hansenpartnership.com, linux-mm@kvack.org, namit@vmware.com, mingo@kernel.org, elena.reshetova@intel.com, aarcange@redhat.com, davem@davemloft.net, Matthew Wilcox , hch@infradead.org, linux-arm-kernel@lists.infradead.org, keescook@chromium.org, syzkaller-bugs@googlegroups.com, jglisse@redhat.com, viro@zeniv.linux.org.uk, christian@brauner.io, wad@chromium.org, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, ebiederm@xmission.com, akpm@linux-foundation.org, guro@fb.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org [snip] > > Would it make sense to have call_rcu() check to see if there are many > > outstanding requests on this CPU and if so process them before returning? > > That would ensure that frequent callers usually ended up doing their > > own processing. Other than what Paul already mentioned about deadlocks, I am not sure if this would even work for all cases since call_rcu() has to wait for a grace period. So, if the number of outstanding requests are higher than a certain amount, then you *still* have to wait for some RCU configurations for the grace period duration and cannot just execute the callback in-line. Did I miss something? Can waiting in-line for a grace period duration be tolerated in the vhost case? thanks, - Joel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel