From patchwork Tue May 28 10:48:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 10964713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF86513AD for ; Tue, 28 May 2019 10:49:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEF3D282E8 for ; Tue, 28 May 2019 10:49:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C38E42844E; Tue, 28 May 2019 10:49:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76C1B282E8 for ; Tue, 28 May 2019 10:49:11 +0000 (UTC) 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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=q/QX2Q9vFpZ+iGLOlkbq77Q/dU+dDVaA8p9k9iOCKXc=; b=pdsw/hQvu0IAo4 gt6XQqy/eKEzoiEEoK/73PD09t7/P9Y7otlmLcHIdGauX8seDWAJZeV+9uYRDFlwV6mYBfPP8lPsp GQlVTZYTFU4AinMTHxJhg2t+R93D+L+oc/DCDupWR3pfNVspKDS2hhJlr7NSMGz9wA+rUGOm5HxiT 9hvdcz5hyiKwXElhhIOb0Thg6eNPlrRPCOU/OWD14jDe6fkvVpVO3tN5s9RZOhRG2iYqX2C7Vw4rt LCRZ4xqA5TWhq+pUo+JaUcdvNZDMIDhbd2FeUVpoMiq3dcwLnogv+E+0ZgLeMP/LOpHJb9X6P0GFm ycaBRwgRvU2ILDnyeBjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVZfI-0003mV-2M; Tue, 28 May 2019 10:49:08 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVZfE-0003lO-Uf for linux-riscv@lists.infradead.org; Tue, 28 May 2019 10:49:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25BF3341; Tue, 28 May 2019 03:49:03 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7C4173F59C; Tue, 28 May 2019 03:49:01 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Subject: [PATCH RESEND 0/7] entry: preempt_schedule_irq() callers scrub Date: Tue, 28 May 2019 11:48:41 +0100 Message-Id: <20190528104848.13160-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190528_034904_996325_C8354B12 X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: uclinux-h8-devel@lists.sourceforge.jp, linux-sh@vger.kernel.org, Peter Zijlstra , linux-m68k@lists.linux-m68k.org, Ingo Molnar , Thomas Gleixner , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This is the (RESEND of the) continuation of [1] where I'm hunting down preempt_schedule_irq() callers because of [2]. I told myself the best way to get this moving forward wouldn't be to write doc about it, but to go write some fixes and get some discussions going, which is what this patch-set is about. I've looked at users of preempt_schedule_irq(), and made sure they didn't have one of those useless loops. The list of offenders is: $ grep -r -I "preempt_schedule_irq" arch/ | cut -d/ -f2 | sort | uniq arc arm arm64 c6x csky h8300 ia64 m68k microblaze mips nds32 nios2 parisc powerpc riscv s390 sh sparc x86 xtensa Regarding that loop, archs seem to fall in 3 categories: A) Those that don't have the loop B) Those that have a small need_resched() loop around the preempt_schedule_irq() callsite C) Those that branch to some more generic code further up the entry code and eventually branch back to preempt_schedule_irq() arc, m68k, nios2 fall in A) sparc, ia64, s390 fall in C) all the others fall in B) I've written patches for B). As of 5.2-rc2 mainline contains those for: - arm64 - mips - x86 - powerpc - nds32 I've also got acks for: - c6x - xtensa The remaining ones for which I haven't had a reply yet (hence the RESEND) are: - csky - h8300 - microblaze - riscv - sh - sh64 Build-tested on: - h8300 - c6x - microblaze Thanks, Valentin [1]: https://lore.kernel.org/lkml/20190131182339.9835-1-valentin.schneider@arm.com/ [2]: https://lore.kernel.org/lkml/cc989920-a13b-d53b-db83-1584a7f53edc@arm.com/ Valentin Schneider (7): sched/core: Fix preempt_schedule() interrupt return comment csky: entry: Remove unneeded need_resched() loop h8300: entry: Remove unneeded need_resched() loop microblaze: entry: Remove unneeded need_resched() loop RISC-V: entry: Remove unneeded need_resched() loop sh: entry: Remove unneeded need_resched() loop sh64: entry: Remove unneeded need_resched() loop arch/csky/kernel/entry.S | 4 ---- arch/h8300/kernel/entry.S | 3 +-- arch/microblaze/kernel/entry.S | 5 ----- arch/riscv/kernel/entry.S | 3 +-- arch/sh/kernel/cpu/sh5/entry.S | 5 +---- arch/sh/kernel/entry-common.S | 4 +--- kernel/sched/core.c | 7 +++---- 7 files changed, 7 insertions(+), 24 deletions(-) --- 2.20.1