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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8272DEEB579 for ; Fri, 8 Sep 2023 20:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694205992; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PeMTXPCYptSjwCoAJ8B3ThddmP+gLHY2FpqvtYa2hEg=; b=W8+Q6uVdpd9mzzoC7BOyJtJ2zCAe7ZQq9xT1qPvd1D3dt5K5HE6DDN2YNIfO0jDYZy5ZHj 0E0q0wLcbbHZzBReIsgUfoZseaWEB6udGc/juUTBIj0qh+NV7OVdz2syJA2xCqUBkRpHDp Q/9WcnLCYxMssC5N5Mj3mY6zbRGM5kw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-339-i3aY0vo6PTe0yTOOvxbA1A-1; Fri, 08 Sep 2023 16:46:27 -0400 X-MC-Unique: i3aY0vo6PTe0yTOOvxbA1A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C8E9980523C; Fri, 8 Sep 2023 20:46:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC805140E964; Fri, 8 Sep 2023 20:46:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D1CA119465BA; Fri, 8 Sep 2023 20:46:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0406C1946586 for ; Fri, 8 Sep 2023 20:46:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EAD1C21EE56A; Fri, 8 Sep 2023 20:46:22 +0000 (UTC) Received: from fs-i40c-03.fs.lab.eng.bos.redhat.com (fs-i40c-03.fs.lab.eng.bos.redhat.com [10.16.224.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id C13FD21EE56D; Fri, 8 Sep 2023 20:46:22 +0000 (UTC) From: Alexander Aring To: teigland@redhat.com Date: Fri, 8 Sep 2023 16:46:04 -0400 Message-Id: <20230908204611.1910601-3-aahringo@redhat.com> In-Reply-To: <20230908204611.1910601-1-aahringo@redhat.com> References: <20230908204611.1910601-1-aahringo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Subject: [Cluster-devel] [RFC dlm/next 03/10] fs: dlm: remove explicit scheduling points X-BeenThere: cluster-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: "\[Cluster devel\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cluster-devel@redhat.com, gfs2@lists.linux.dev Errors-To: cluster-devel-bounces@redhat.com Sender: "Cluster-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true This patch prepares to switch some locks to a spinlock. In this case we need to remove some explicit schedule points when a spinlock is held. We might have less scheduling points to try to serve others, we need to see if this still makes problems when we remove them and find other solutions. Signed-off-by: Alexander Aring --- fs/dlm/lock.c | 2 -- fs/dlm/recover.c | 1 - fs/dlm/requestqueue.c | 1 - 3 files changed, 4 deletions(-) diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 970b8499b66f..61eb285c613c 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -4979,7 +4979,6 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls) log_error(ls, "invalid lkb wait_type %d %d", lkb->lkb_wait_type, wait_type); } - schedule(); } mutex_unlock(&ls->ls_waiters_mutex); kfree(ms_local); @@ -5218,7 +5217,6 @@ void dlm_recover_purge(struct dlm_ls *ls) } unlock_rsb(r); unhold_rsb(r); - cond_resched(); } up_write(&ls->ls_root_sem); diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c index ce6dc914cb86..752002304ca9 100644 --- a/fs/dlm/recover.c +++ b/fs/dlm/recover.c @@ -543,7 +543,6 @@ int dlm_recover_masters(struct dlm_ls *ls, uint64_t seq) else error = recover_master(r, &count, seq); unlock_rsb(r); - cond_resched(); total++; if (error) { diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c index c05940afd063..ef7b7c8d6907 100644 --- a/fs/dlm/requestqueue.c +++ b/fs/dlm/requestqueue.c @@ -106,7 +106,6 @@ int dlm_process_requestqueue(struct dlm_ls *ls) error = -EINTR; break; } - schedule(); } return error; -- 2.31.1