Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2716293pxb; Thu, 3 Feb 2022 12:36:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJz46FSi+DISBc3hWD1rfhgZvkZaw64lRk3dSmwMzwwVVqXqx7wUVmBX7RbRAM+Ipa1UoXWN X-Received: by 2002:a63:e704:: with SMTP id b4mr29382389pgi.315.1643920606332; Thu, 03 Feb 2022 12:36:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643920606; cv=none; d=google.com; s=arc-20160816; b=gB5lhDFS7NGMb1ygYLo+Q3smIffwUWK/3WxyI9z8NHXSpv1st+wcLwRp0qnqcGF5bs h8dypM4EJCFYkSChp3L9ur2QTNCaKgM1gKtC9lX+PA8MqP3DojzyEyLN0IKS0JvTU3EM xw3oT1ERRxI6TJVO2Oyauae3Ib6ntzcPbma5CwXcgCXo2d632JKbU4BdYPUG92FUGaUt rUvf24Jln8+hetwwTaAU2iGzDkTQ/A7LScWOoxcMZjJu3gRu/jqxHHCKSmAPXcezrG8d 7Yudy/t6nIm2QPAt9S6C/WiUWVzkfres6EvjD+iGyc/vdZ8j9NPaf3QlFHoStbaFhxhk R18A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=PgSqn/ODuYhw3oBb7FQ1z3UvPoM3gm20EXCy4PGXA6c=; b=Fez9/oJ+RvbUh41Ikna0+MqIH8PCRT8zR598vAt1xJM2QIDYyUwEApxjUhQVoey9jA Jv+wAgWzwh/JyGvIMZqsXpzD8TO/BLL8NTor19KS+ckxL+AHA4TeScStZ2bXe8L5kEF+ rHBYKXq++4mJCGj6vuVFh4bx5Qy+tcMQ7646/UZCYlzK3oirq1a9r6KqsDf3lnPE6Gfg Cvimw91FKQCR2NXU+iWggxSsJvfs5JuXiYOrJS+FIyhdZSs2dkStFygCh2Cm5n6FBjWS 0ldfj/ertfuayZM2JHWCP2Ta+O4/18sVzoau9Ohanx5P+9ZECFwKrZrpmTcOZIB4LLlB xOdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XOW3TJJF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l70si23112186pge.564.2022.02.03.12.36.33; Thu, 03 Feb 2022 12:36:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XOW3TJJF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239569AbiBAWdr (ORCPT + 99 others); Tue, 1 Feb 2022 17:33:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235380AbiBAWdq (ORCPT ); Tue, 1 Feb 2022 17:33:46 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 342E1C061714 for ; Tue, 1 Feb 2022 14:33:46 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id e28so17157308pfj.5 for ; Tue, 01 Feb 2022 14:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PgSqn/ODuYhw3oBb7FQ1z3UvPoM3gm20EXCy4PGXA6c=; b=XOW3TJJFZ72W2QAKV7//T3KK8i5/1kgPMVQsiP2e9IJV6j7gy3+iHugCVvZX49621S pEE1rviUsjkSnaUjyEgPDQGXRu+37knzkf/NkUdUODcQTp2WDmGm7aYmkfibBXmIr7li ma3JUfn+VVWLBV5l7Q+YiyD/A8EHQq7cmbAhZyR8ljbbUmM6VOQbfBl7sG5MBzJNR2vl q2BpeGNsI884E+Ih1MqMwOfhbDlIrv6/WAP9JnaUQ4wNc35m04i166lcwW5q4vJpLog4 3djMUsArDvYA784Yv4HwaZ21YtK6SOWetlk99OXo8SC7YMRYFARLP9UH/XFLgj6Jcye+ gyAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=PgSqn/ODuYhw3oBb7FQ1z3UvPoM3gm20EXCy4PGXA6c=; b=6B80vMfDQyr7NIIdUfJE/W2+sj6Tsh775N7Tplzn0dpy+Hqb+WFoOjLA7FPD5SJAMe t5RzG6GBrULJl/4fcPfTsDhQnaRxwG4PqOo6GIB7r5SGCeWajvEPMJt+hgZkRMLJLky7 Q+mJHQ1T7q2M26wRQRXD1woP0ApdJsj54V5WtwkJvupHq2X3zwMRlkq5l5QhpyAtx7bS MT1iiTJP6NSr8Zdv2Ry6Z6eTwk2Gec/R9n0q1xSh9hYEPCtL4nhjEU+MKkIBImJcWA5J vU7gzHW3SRmA875YsoLFLYpWbBhlrnQYeYfcclvgv+4JnSrUyXFFIDYKbGGfQcppc24Y IDlw== X-Gm-Message-State: AOAM533dEVAOFG6QzlbD5UvVX3HawZAyVsj/S5hbXBlhsJsssVuKIRNF FL/CKXU9yYDw2GNSX97rBl/qzgjmnEI= X-Received: by 2002:a05:6a00:7ce:: with SMTP id n14mr27489212pfu.11.1643754825297; Tue, 01 Feb 2022 14:33:45 -0800 (PST) Received: from google.com ([2620:15c:211:201:1b1a:cadc:e9c0:fbd5]) by smtp.gmail.com with ESMTPSA id g19sm19581574pfv.164.2022.02.01.14.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 14:33:44 -0800 (PST) Sender: Minchan Kim Date: Tue, 1 Feb 2022 14:33:43 -0800 From: Minchan Kim To: LKML , Peter Zijlstra , Waiman Long Cc: Tim Murray Subject: Re: [PATCH] locking: add missing __sched attributes Message-ID: References: <20220115231657.84828-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220115231657.84828-1-minchan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 15, 2022 at 03:16:57PM -0800, Minchan Kim wrote: Bumping up. > This patch adds __sched attributes to a few missing places > to show blocked function rather than locking function > in get_wchan. > > Signed-off-by: Minchan Kim > --- > kernel/locking/percpu-rwsem.c | 5 +++-- > kernel/locking/rwsem.c | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c > index 70a32a576f3f..c9fdae94e098 100644 > --- a/kernel/locking/percpu-rwsem.c > +++ b/kernel/locking/percpu-rwsem.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > #include > > int __percpu_init_rwsem(struct percpu_rw_semaphore *sem, > @@ -162,7 +163,7 @@ static void percpu_rwsem_wait(struct percpu_rw_semaphore *sem, bool reader) > __set_current_state(TASK_RUNNING); > } > > -bool __percpu_down_read(struct percpu_rw_semaphore *sem, bool try) > +bool __sched __percpu_down_read(struct percpu_rw_semaphore *sem, bool try) > { > if (__percpu_down_read_trylock(sem)) > return true; > @@ -211,7 +212,7 @@ static bool readers_active_check(struct percpu_rw_semaphore *sem) > return true; > } > > -void percpu_down_write(struct percpu_rw_semaphore *sem) > +void __sched percpu_down_write(struct percpu_rw_semaphore *sem) > { > might_sleep(); > rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_); > diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c > index 69aba4abe104..acde5d6f1254 100644 > --- a/kernel/locking/rwsem.c > +++ b/kernel/locking/rwsem.c > @@ -1048,7 +1048,7 @@ rwsem_down_read_slowpath(struct rw_semaphore *sem, long count, unsigned int stat > /* > * Wait until we successfully acquire the write lock > */ > -static struct rw_semaphore * > +static struct rw_semaphore __sched * > rwsem_down_write_slowpath(struct rw_semaphore *sem, int state) > { > long count; > -- > 2.34.1.703.g22d0c6ccf7-goog >