Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3330627pxv; Mon, 28 Jun 2021 02:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzywFgfu+c6dzCfeVDaoNvr8l0FuB7JN1KVp2EdR2Q5fio7ZxJXfOcTHzZJJ3wSY6XM2tST X-Received: by 2002:a92:c00a:: with SMTP id q10mr6452343ild.138.1624871158405; Mon, 28 Jun 2021 02:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624871158; cv=none; d=google.com; s=arc-20160816; b=Unhfoo7ZbnAFkrCAIaaRCntFw0Ax1cnR8Y+48iXVuo0v35ASVSfkNC64PB/F0DV6r7 c/UVVuRmhj/g/0R4V7RxBFXIFlHkL1XzG6yribathhNXkvcRwFCEm1wr4jWWZAksYDyA vaeGLzgLiFwpbiWJn4rZA4IxZnERWR9Rn4S4MMOQ/YBD13w/O7ZcDxxkxMnSqQeYu3xG HLBcw3Dov7dfaGOLm7Ph+lGaTPTd4WjTzB21b/JnewC831GmkyG+unYSilT2jzM98Hs2 miZpfgyNvbRfXzUoh2We7bH+cUkbfYnwJS/I4yMVebqmd4EbI0pz6d6Mnter4R8RJh2/ tkAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=pSze+havdEUp5g4UGgcMsdfbY2u41+Dmsmn0rCQNfpE=; b=VmuElm3gNDRNS9zHMDdPI37Wr3pnfS4KA17NqiGn4obj7wPlilTKFXJs6OFextTikM TlXxpJX2ZSTJ4Bk0kJpkgz6Y9xMK7fSrdaExnNnU8wba5rAx8s6i87xMI1zYh1lguNwp xStakwBvNw+Amle4KDUAbI8lO1HAE/ZarU0UO64agWwrn3hbCAyGr4jsHDEViQ8bjBh3 U0Sj8q/twLKOa/de8+0tP+CEi/h5e85ErviYuTR/uiDtKPeCUHSIu5cAZodN6LjDL9mm vrK8GONEojtof8dg8/pidXQuqcnUcIawd+pF/FkUZBYfJNnF0hXVWpRgBqkJxq4gr/n5 SF9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=R66EXrUH; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="3937/Nz8"; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=R66EXrUH; dkim=neutral (no key) header.i=@suse.de; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si10779200iol.103.2021.06.28.02.05.46; Mon, 28 Jun 2021 02:05:58 -0700 (PDT) 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=@suse.de header.s=susede2_rsa header.b=R66EXrUH; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="3937/Nz8"; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=R66EXrUH; dkim=neutral (no key) header.i=@suse.de; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232444AbhF1JGh (ORCPT + 99 others); Mon, 28 Jun 2021 05:06:37 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:53410 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbhF1JGg (ORCPT ); Mon, 28 Jun 2021 05:06:36 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D8942223C2; Mon, 28 Jun 2021 09:04:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624871049; h=from:from:reply-to: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=pSze+havdEUp5g4UGgcMsdfbY2u41+Dmsmn0rCQNfpE=; b=R66EXrUHz9iA4t4GBnFAMHyhL4/ZN59rXQDA5pdk8eO2iPB4l8MI1So63qFZ6l5IJ1Os44 BRlLk4uDcfc3iiwpZ1Pc/4JCF+tTaUjYLREg7Djga5KIoQmnr8UXCipv/P1YlhKIxnk/MA yEeKGzm82s31k93pc9GQAycHimT6RvA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624871049; h=from:from:reply-to: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=pSze+havdEUp5g4UGgcMsdfbY2u41+Dmsmn0rCQNfpE=; b=3937/Nz8NQxjy1lXJ44quW8IEMuSUc8gV6WWJ/6EH55X4SpWrWwwC6ltYMOjYdzJxk54bq /vGMb4talDFrxhDw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 71A94118DD; Mon, 28 Jun 2021 09:04:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624871049; h=from:from:reply-to: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=pSze+havdEUp5g4UGgcMsdfbY2u41+Dmsmn0rCQNfpE=; b=R66EXrUHz9iA4t4GBnFAMHyhL4/ZN59rXQDA5pdk8eO2iPB4l8MI1So63qFZ6l5IJ1Os44 BRlLk4uDcfc3iiwpZ1Pc/4JCF+tTaUjYLREg7Djga5KIoQmnr8UXCipv/P1YlhKIxnk/MA yEeKGzm82s31k93pc9GQAycHimT6RvA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624871049; h=from:from:reply-to: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=pSze+havdEUp5g4UGgcMsdfbY2u41+Dmsmn0rCQNfpE=; b=3937/Nz8NQxjy1lXJ44quW8IEMuSUc8gV6WWJ/6EH55X4SpWrWwwC6ltYMOjYdzJxk54bq /vGMb4talDFrxhDw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id wWDAGImQ2WAhTgAALh3uQQ (envelope-from ); Mon, 28 Jun 2021 09:04:09 +0000 Received: from localhost (brahms [local]) by brahms (OpenSMTPD) with ESMTPA id dc16ae65; Mon, 28 Jun 2021 09:04:08 +0000 (UTC) Date: Mon, 28 Jun 2021 10:04:08 +0100 From: Luis Henriques To: Jeff Layton Cc: Ilya Dryomov , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [RFC PATCH] ceph: reduce contention in ceph_check_delayed_caps() Message-ID: References: <20210625154559.8148-1-lhenriques@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 25, 2021 at 12:54:44PM -0400, Jeff Layton wrote: <...> > I'm not sure this approach is viable, unfortunately. Once you've dropped > the cap_delay_lock, then nothing protects the i_cap_delay_list head > anymore. > > So you could detach these objects and put them on the private list, and > then once you drop the spinlock another task could find one of them and > (e.g.) call __cap_delay_requeue on it, potentially corrupting your list. > > I think we'll need to come up with a different way to do this... Ugh, yeah I see what you mean. Another option I can think off is to time-bound this loop, so that it would stop after finding the first ci->i_hold_caps_max timestamp that was set *after* the start of the current run. I'll see if I can come up with an RFC shortly. Cheers, -- Lu?s