Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4787222yba; Tue, 30 Apr 2019 04:30:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeymwDhtraMxO22w8eoiOYC6QYm4XUGVYfX9f9d9oKLSEEyZZNv+PmUnzJvBbR0w04iK3N X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr10948626plx.75.1556623818618; Tue, 30 Apr 2019 04:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556623818; cv=none; d=google.com; s=arc-20160816; b=OPxk9/e125rn9J9f1DxlZ5g+Qh4KbP+PvvWBNSYNu+pwroMOKu8KBxF/zae7oFKHtZ aId31v3I3/xk6DS6dCZ775g5629SduYzG8Kdca6HuO5yCJJ7awC+pq72nqPsOcojL4s3 Kz6TdCctIuTOyBCXyg3Gl4SK/718pgyoXuDWhjopNRHuQm1/5cVkCLUPwGjSv/BRC+qu o1gwt5Q9AqsLz5Nm2TK9yX2sNfcnj3GUMlRtNJDcvjzzv8eKda3p4P9NBt3QsPjM+RNB VH8zcPcDaRcDw+R0I4JsohVjLtMioay2lL7hheILuDZOOzevGyjFL2sTbAL53ZZxp+fZ FGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5O2+RnRzsGziCKevlN2S9YTh6Dm2C3BUHXgWytA5mR8=; b=OpynF5ahxcHE580+PZF101Gig4JL46jH8GLkWmwxBU2QNTfMGqcU+KmGvUme9fT+fU cj06MpJp+Y9rUwz7LnIl4wT3TWk+HPZX6d/3aJE8Gfz0aw0BmQBBzgyL9FXOZUteiK5Z f13dfPTLThJh34aYDn7V2Z/bVcykGmUMSktCZL+b24ziG6l15tkpJFqMw1FpePE0Gb8V zNtvYs2/x/ixwk8ohH4eOl8Kn/+S9WQ37dTXjJQNhljQi+2rYyEDp3IDIlMRxlXkHKEJ Eyt0i5SMv8BKxg50KMmIWmDYhIDGo51aGwZMiG+zXLliJstdBguF7fVuU811XU0x9eGT Wh/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h24si34359808pgg.226.2019.04.30.04.30.01; Tue, 30 Apr 2019 04:30:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727927AbfD3L2Z (ORCPT + 99 others); Tue, 30 Apr 2019 07:28:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54337 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbfD3L2Y (ORCPT ); Tue, 30 Apr 2019 07:28:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7454A2D7F5; Tue, 30 Apr 2019 11:28:24 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.khw1.lab.eng.bos.redhat.com [10.16.200.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 101506F547; Tue, 30 Apr 2019 11:28:23 +0000 (UTC) Subject: Re: [PATCH] kernel/module: Reschedule while waiting for modules to finish loading To: Jessica Yu Cc: Heiko Carstens , linux-kernel@vger.kernel.org References: <20190429151751.15424-1-prarit@redhat.com> <20190430075108.GA21092@linux-8ccs> From: Prarit Bhargava Message-ID: <49a246d0-3751-7d13-d7fd-01eac446b922@redhat.com> Date: Tue, 30 Apr 2019 07:28:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190430075108.GA21092@linux-8ccs> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 30 Apr 2019 11:28:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/30/19 3:51 AM, Jessica Yu wrote: > +++ Prarit Bhargava [29/04/19 11:17 -0400]: >> Heiko, do you want a Signed-off-by or a Reported-by?  Either one works >> for me. >> >> P. > > I think you forgot to CC Heiko :) #oops. I forgot that git-send-email doesn't pick up "Reported-by". P. > >> ----8<---- >> >> On a s390 z14 LAR with 2 cpus about stalls about 3% of the time while >> loading the s390_trng.ko module. >> >> Add a reschedule point to the loop that waits for modules to complete >> loading. >> >> Reported-by: Heiko Carstens >> Fixes: linux-next commit f9a75c1d717f ("modules: Only return -EEXIST for >> modules that have finished loading") >> Signed-off-by: Prarit Bhargava >> Cc: Jessica Yu >> --- >> kernel/module.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/kernel/module.c b/kernel/module.c >> index 410eeb7e4f1d..48748cfec991 100644 >> --- a/kernel/module.c >> +++ b/kernel/module.c >> @@ -3585,6 +3585,7 @@ static int add_unformed_module(struct module *mod) >>                            finished_loading(mod->name)); >>             if (err) >>                 goto out_unlocked; >> +            cond_resched(); >>             goto again; >>         } >>         err = -EEXIST; >> --  >> 2.18.1 >>