Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2337814ybe; Tue, 3 Sep 2019 11:20:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxIMsiaLCHg6a4WigipoBpBUGqHsc3PEfPrZblfFFS35jZyqVNAVe+NVVj0RGKkrCLP+VT X-Received: by 2002:a62:e40e:: with SMTP id r14mr15575535pfh.86.1567534827877; Tue, 03 Sep 2019 11:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567534827; cv=none; d=google.com; s=arc-20160816; b=L5PAyT7jzIIbmX/Z6TJvFY9k1BXG8woe1b+CYur1bh5Esr9LSBkzAfM+ZaSx3W/1BE LJu5rfU7NxZcEsoo8/Q0770g3zEpHgZ7hq3OcMpaUTPL7l2A5AiaWdIYWF5uKz+s/Cdk WOQk/JXVRrEt3qGHLW3Rv7oUR4L6d9U2eouaA5rDeM5YaNBOomePsdLCr+Qq+kx5xhDV YfKbI0uWSX78pLRw2lNRYmG1xnk9odSTtudKeBVgOgdMl8Orx4H31IOueB34Wgb6qbQK nEE4w9pW2lMWpF+vx53SeJFdQxmojt9z8SFX0dgLL3sb6qFK6SUQ0y3V6GS5hNTQXGoZ oUMQ== 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=Ty/2ohLAJ+2sCNPsz6Mg9g82ZAcXCLPeRSTUh8dn1AM=; b=uS3nJRU2LuaWyYlFnPlGWBlfuXb5s8u9450iHjrxcD0/naXDSpnpwQQRWeSiu2OU0Q sEJEt8kC/Ak+nH3DuSHWhEGy6JJk2TAftTuTsuiVxuHlNcVNztm+6athRxDU+Onq3xFC 4QfDzV4gyWu4rSaGi78cp3Vh+oxyPh4etcWdezFx6Z5YhkI08XAKuIHXC+PqgwMwzG/X URvtHF4ub7N5JI+mAFTAMSeVM2MoOl6pbb5mwGqe/WdjgPL5XDQJMwzPfdDMM+w436KW 2RVqZ0YnnBJ5HIlqwHOFaY4syVppY2HQSKKEnlBbuKVZzWY0gsFOWG7/V/A7QDJ1GEMs 5LOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iXrN3Q7P; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a95si15208101pla.2.2019.09.03.11.20.11; Tue, 03 Sep 2019 11:20:27 -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=@gmail.com header.s=20161025 header.b=iXrN3Q7P; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730126AbfICSTZ (ORCPT + 99 others); Tue, 3 Sep 2019 14:19:25 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41121 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbfICSTZ (ORCPT ); Tue, 3 Sep 2019 14:19:25 -0400 Received: by mail-wr1-f68.google.com with SMTP id j16so18513385wrr.8; Tue, 03 Sep 2019 11:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ty/2ohLAJ+2sCNPsz6Mg9g82ZAcXCLPeRSTUh8dn1AM=; b=iXrN3Q7PNVG79k4/QPwtJd360wJBFRowaCrtFARluncD92iaxPMac9rPX4B8Hxlta6 u/egCzq2FHk7WjWNT5OjHCutDCAyvbBIMEMQuj8Uk4fIXVLKHzupt38V5eoEGLwnfxwW SqBXpSsY/Zq0zJG1z5wQjb1fmAE3V7w/wzzAZ519iQse6X2qAu5JHAI73GwS2t32czqK aEyRcgYkrUFclz9SJ+tw3xs2406lVI/hppCdyT62DYo33sOUME/5kqeaSlong/0UwJNK BC39yQeVjmmfS/aYtMtAzcaVCNQrjnTBP1j/Srlo1GRn0raysle8n1hJupyIU46tYxsy mumA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ty/2ohLAJ+2sCNPsz6Mg9g82ZAcXCLPeRSTUh8dn1AM=; b=a6O2CJbylSxcnI+FXxqhwa20+OHPsux9nxODLJNNpuay+BzEp2CtZmXl7SFujkVyWi +wxStXpQZ3lXgo1jDDXUbi82x0mTyjaovM4MCjRTmb8DY2he1Djhyk3oHJBcM2f3c/tn iCf5LKPDelXH3cwLhSBmWDjtATYWaroP8sqqgG9VR9GX5Agigvgqs8aZupwk7Ta3VYcm jW9GuvERyDCL5Mjm4a+mUMrCtKqU/RyajS/UWrJpXAWCMTOiO4EZm1WxNGv/qczsY20P yJDYsRUmTJ6RX7Lj+I53qQw9RjZhx0phgoOr+Jk8VLt2vkdONSJ+QGzZ7gg1y12nE5SA Tkmg== X-Gm-Message-State: APjAAAUnnXk44zLvxTQ7eMwbEZ19Iz/5dgOZ9j/xfJr8ua8JOv5exYNU x9swyvR/O6uND2suTcHmww== X-Received: by 2002:adf:fad0:: with SMTP id a16mr1790618wrs.195.1567534762701; Tue, 03 Sep 2019 11:19:22 -0700 (PDT) Received: from avx2 ([46.53.254.228]) by smtp.gmail.com with ESMTPSA id t14sm19292468wrs.58.2019.09.03.11.19.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Sep 2019 11:19:22 -0700 (PDT) Date: Tue, 3 Sep 2019 21:19:20 +0300 From: Alexey Dobriyan To: Valentin Schneider Cc: mingo@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, axboe@kernel.dk, aarcange@redhat.com Subject: Re: [PATCH] sched: make struct task_struct::state 32-bit Message-ID: <20190903181920.GA22358@avx2> References: <20190902210558.GA23013@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 On Tue, Sep 03, 2019 at 06:29:06PM +0100, Valentin Schneider wrote: > On 02/09/2019 22:05, Alexey Dobriyan wrote: > > 32-bit accesses are shorter than 64-bit accesses on x86_64. > > Nothing uses 64-bitness of ->state. > It looks like you missed a few places. There's a long prev_state in > sched/core.c::finish_task_switch() for instance. > > I suppose that's where coccinelle oughta help but I'm really not fluent > in that. Is there a way to make it match p.state accesses with p task_struct? > And if so, can we make it change the type of the variable being read from > / written to? Coccinelle is interesting: basic - foo + bar doesn't find "foo" in function arguments. I'm scared of coccinelle. > How did you come up with this changeset, did you pickaxe for some regexp? No, manually, backtracking up to the call chain. Maybe I missed a few places.