Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5853347yba; Wed, 1 May 2019 00:50:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKGNQs/oyLBObK0oRJWM/XtpKQcPVJtCdTKuSp5spJrVIWONGESpD2IAicSE6FS+GRKT8l X-Received: by 2002:a62:3684:: with SMTP id d126mr25117813pfa.70.1556697017745; Wed, 01 May 2019 00:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556697017; cv=none; d=google.com; s=arc-20160816; b=wxrMeeKviZQhPIsNTWgcQNgKLhN8raC0W4SEffSU6CPDlWwo2np/GBnWsGUEZfOy6v qcoV45Yr6p2djcnI9nMRabTBXg13fv5S/E/OGhTkNJ2BGfAqM3BJUiqrrGSxY4PGcgZZ 3T3LB+e0BJGRJpA3nIZSesMUhWHwwCE2+VMOqqEtb6qW8frQLsiJN1EA6Z6e7F4povon MB2/d1uSlyydL2BATJXX+FeHHsAZGktd1PhsFCBgcpQpE9E9AHWMltyUa1T+CUlqFaD1 zZAPmwS4exROH/kdaRngN61BzQBLt+rwFtR0I0Ke6FvpOxzCmqyVt+eLAt/jl+2/ekXf m8hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vJI3jO0Cm26y/fo/+uggb49Sv7hQKDfbiZXQdkPCT6w=; b=DeBWmytfaB+PYL8vgYAZse3VrBKDTI9PyU1woYbWS6emfb4KqCvX1vtnccr+6iZiJ+ JIdFzMltAC28ShamNLxPPIgu79AymKA01IzX0rJaL8+uu1bI7rE916Ymp20+H2URlv8z RxfzErbRAt9n8G6ixL7HKhuUIUUOPE/WDgcDMyZ42Fmoj4Zvo1uhFhzIAAk0ZKf9TaUt 7HN5DBxO/HXk8F7idqQ0Iwh7TUCKxe1h9NZoxC4gKwN9nH/F9Mpt0+uDWETY6yez8+46 qBnf/3XJtdK/NDAgDMt/9jj4mjF5yNNSbMNkV5y7HYh7gOTO5aHJhMahuPZJh4cBTBT5 6ZVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kz5ZywLQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si39539493pfi.8.2019.05.01.00.49.59; Wed, 01 May 2019 00:50:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=kz5ZywLQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726101AbfEAHtF (ORCPT + 99 others); Wed, 1 May 2019 03:49:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:35808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfEAHtF (ORCPT ); Wed, 1 May 2019 03:49:05 -0400 Received: from linux-8ccs (ip5f5ade58.dynamic.kabel-deutschland.de [95.90.222.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E161120835; Wed, 1 May 2019 07:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556696944; bh=T7T/LYH0oG6Mc669/vIbBfSwXFvp8DN+Ci6R4EJ8Qn0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kz5ZywLQtC5O4MQJgeBS7YOcoYeVeHsk+DL/bwKbOfvzXsrel5rxxDm2pzWIm2yAN dBA8E7qK7EfaCFd1HInwQci20NcAAH8osWtQusbk1xKb0pGZ1yZh0IasTNeV/g/PHd bFhrdLjYHakCsLHmG7Ym1QFbgYvBeTbYCoostYYM= Date: Wed, 1 May 2019 09:49:00 +0200 From: Jessica Yu To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Heiko Carstens Subject: Re: [PATCH v3] kernel/module: Reschedule while waiting for modules to finish loading Message-ID: <20190501074900.GA10762@linux-8ccs> References: <20190430222207.3002-1-prarit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190430222207.3002-1-prarit@redhat.com> X-OS: Linux linux-8ccs 5.1.0-rc1-lp150.12.28-default+ x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Prarit Bhargava [30/04/19 18:22 -0400]: >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. > >v3: cleanup Fixes line. Thanks, this patch has been re-applied to modules-next. Jessica >Reported-by: Heiko Carstens >Fixes: f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") >Signed-off-by: Prarit Bhargava >Cc: Jessica Yu >Cc: Heiko Carstens >--- > 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 >