Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2309124imc; Tue, 12 Mar 2019 11:05:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyOpGneJDIZegBd85s/Z6WM0qsE2oOzI7B1n4KFNYZjfRrIbbg80s43u9xUyXXFfksk683 X-Received: by 2002:a65:6210:: with SMTP id d16mr22613465pgv.189.1552413935337; Tue, 12 Mar 2019 11:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552413935; cv=none; d=google.com; s=arc-20160816; b=z1qrvMsFWjgN0SO0cmUDwXjp25JPMaONznAM+MPWA++gGYGyiHpKovNpYmBAhRX6Kv seZwRArPli6iKLT1Y1+6LgQ2vjPVRHTBH3PTvKvBeEeoZUO8HremGwCkvxUGKnZ21JM4 OrFhzzUb4FHUGh2Z/nnl82Sygs3H4oReca1KCTfie/5MCt248owuum3IUvwHS/dZm/ov OGLfaKvpqENNc1Cba40mjbqlHFFjT7Gzxa4Ud5C5u16FW0NJo05eflKJy1O3ofZKx7fD znWZRfHmKvtp8jrxPeWyyy4u3QeAIBkvScY985PV5nZ+tH4zV75fLFsZ2A4BSSjGlq2j BXug== 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:autocrypt:openpgp:from:references:newsgroups:cc:to :subject:dkim-signature; bh=SHLDFyepThx/DriLfqcYpOQXxv/RmwIIUYLuzSEhJuY=; b=hA5ZGGofS+CfYIqukUMEM+wBvja02P77J2JMlnKsQHEzzW5H96yowSHCHwYYlFXBdc GvRRMhrpWY5mdum1cTlthTClRpuNlPt/hpj9Efmia6jLnnw8DSewBlO9vOl3zxOvk65q zOvnPIY94pya+7VzA7sDxoVEGfGQQI4v0an/sPUtUlRu7LSKtjjiRMpiKLtAM6xwvBqs /bRF1i6UqQQQ3idy/8viOzjfnQyIEer/zeJfvvorudnGmjPH2bpV5L3i7I0dX4qarZY/ DToZQsRvjVq12eOgfA2xCmbvF9QOSyakYquOmB0pssRtTOLwhXpbMMKXf7j+Rsrd7kdW cv4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=KLqrmYrR; 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=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p91si2165346plb.61.2019.03.12.11.05.19; Tue, 12 Mar 2019 11:05:35 -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=@synopsys.com header.s=mail header.b=KLqrmYrR; 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=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbfCLSEP (ORCPT + 99 others); Tue, 12 Mar 2019 14:04:15 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:36930 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfCLSEN (ORCPT ); Tue, 12 Mar 2019 14:04:13 -0400 Received: from mailhost.synopsys.com (dc8-mailhost1.synopsys.com [10.13.135.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtprelay.synopsys.com (Postfix) with ESMTPS id 9B63924E131D; Tue, 12 Mar 2019 11:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1552413852; bh=qX/H7rRtR1PnxksLEqcd0TpNr5z1AJVxJ64WQy3x4uo=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=KLqrmYrRvmHo8rPOyr6wg8h96t7taxfStODWR+SrRt+STgktc/Tf3FXZBx6sxw/LH eQWLbSyoZ//bOXjI0zfkp9LCBtNIiNcrTHOWmxEJotNehOoV6cZGKyimFVl0QMeSLH g+RCoWn7pyNt5HCm30LudBs86Kl7HLlrRyLWqXFiZ+O0EfyPUcEsw4HbHuMrj67rBm /NsSVjHnNKZQMtnGMU5Jum7dBVmWoJ9ZI+7JZlmgQZvQRau+fZr3ZnvUn9/iL5+miX lmicsUUOkbnm6/cMatFZPGZTG0RtsftnVpZWGEB+9JD1r4a6Y2HhAtk017f1vqLcWM K48yFty4n3zIA== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPS id 49124A006B; Tue, 12 Mar 2019 18:04:09 +0000 (UTC) Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 12 Mar 2019 11:04:09 -0700 Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.105) by IN01WEHTCA.internal.synopsys.com (10.144.199.103) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 12 Mar 2019 23:34:13 +0530 Received: from [10.10.161.89] (10.10.161.89) by IN01WEHTCB.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 12 Mar 2019 23:34:13 +0530 Subject: Re: [PATCH 00/14] entry: preempt_schedule_irq() callers scrub To: Valentin Schneider , CC: Julien Thierry , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , , , , , , , , , , , , , , Newsgroups: gmane.linux.kernel,gmane.linux.ports.sparc,gmane.linux.ports.sh.devel,gmane.linux.ports.riscv,gmane.linux.ports.ppc64.devel,gmane.linux.ports.mips,gmane.linux.ports.ia64,gmane.linux.kernel.arc References: <20190311224752.8337-1-valentin.schneider@arm.com> From: Vineet Gupta Openpgp: preference=signencrypt Autocrypt: addr=vgupta@synopsys.com; keydata= mQINBFEffBMBEADIXSn0fEQcM8GPYFZyvBrY8456hGplRnLLFimPi/BBGFA24IR+B/Vh/EFk B5LAyKuPEEbR3WSVB1x7TovwEErPWKmhHFbyugdCKDv7qWVj7pOB+vqycTG3i16eixB69row lDkZ2RQyy1i/wOtHt8Kr69V9aMOIVIlBNjx5vNOjxfOLux3C0SRl1veA8sdkoSACY3McOqJ8 zR8q1mZDRHCfz+aNxgmVIVFN2JY29zBNOeCzNL1b6ndjU73whH/1hd9YMx2Sp149T8MBpkuQ cFYUPYm8Mn0dQ5PHAide+D3iKCHMupX0ux1Y6g7Ym9jhVtxq3OdUI5I5vsED7NgV9c8++baM 7j7ext5v0l8UeulHfj4LglTaJIvwbUrCGgtyS9haKlUHbmey/af1j0sTrGxZs1ky1cTX7yeF nSYs12GRiVZkh/Pf3nRLkjV+kH++ZtR1GZLqwamiYZhAHjo1Vzyl50JT9EuX07/XTyq/Bx6E dcJWr79ZphJ+mR2HrMdvZo3VSpXEgjROpYlD4GKUApFxW6RrZkvMzuR2bqi48FThXKhFXJBd JiTfiO8tpXaHg/yh/V9vNQqdu7KmZIuZ0EdeZHoXe+8lxoNyQPcPSj7LcmE6gONJR8ZqAzyk F5voeRIy005ZmJJ3VOH3Gw6Gz49LVy7Kz72yo1IPHZJNpSV5xwARAQABtCpWaW5lZXQgR3Vw dGEgKGFsaWFzKSA8dmd1cHRhQHN5bm9wc3lzLmNvbT6JAj4EEwECACgCGwMGCwkIBwMCBhUI AgkKCwQWAgMBAh4BAheABQJbBYpwBQkLx0HcAAoJEGnX8d3iisJeChAQAMR2UVbJyydOv3aV jmqP47gVFq4Qml1weP5z6czl1I8n37bIhdW0/l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gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190311224752.8337-1-valentin.schneider@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.89] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/11/19 3:47 PM, Valentin Schneider wrote: > Hi, > > This is 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 > ... > > Regarding that loop, archs seem to fall in 3 categories: > A) Those that don't have the loop Please clarify that this is the right thing to do (since core code already has the loop) hence no fixing is required for this "category" > 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) and C) EXCEPT for ia64 and s390 because I > haven't been able to tell if it's actually fine to kill that "long jump" > (and maybe I'm wrong on sparc). Hopefully folks who understand what goes on > in there might be able to shed some light.