Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1947346ima; Sat, 2 Feb 2019 10:39:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN5nfVOvhw6rwgOCHKkLuwReKPmFAgDyAEnQ/zAc9BaGPkB3mS7Hrrej4QW01noLAOKCW6Tg X-Received: by 2002:a62:a209:: with SMTP id m9mr45214967pff.218.1549132785616; Sat, 02 Feb 2019 10:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549132785; cv=none; d=google.com; s=arc-20160816; b=CIjt00MV06tqOYPdEs8ex9/JMJgvcomErD9XDBh0Qnsq5nRc9ZQC9QD2ndmBtfjZp4 S895U08ooCzosC4ZsYGCwLJXENCjeQVd5GRetpGbhjzVT9s4ecZdKOVYEN0QPTIboRCc zqj3RtlJJ7+s0l6j0CgbcnTR1gPZjDHQSGGqsxyZVcDjkUyuySbiNL4TCs9elB2BzI9H FQsRB9TgR2h1SouZCM9SoF8ZQ5aIbo2iFKtIGvBC3gbARuOaKgdwm2D/EkxaEeSR9GbL aKP6vP/It/24XUAfV9+WAkkzZSbT5kBLV3FiP24T265N/1MsS3ZUHfV7UTxWITM8tBQO cz3w== 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=nbSyTxaBa6IIcdk8bp7fWTfN4Jl+3MC9AoZ9nbQ94gI=; b=v6qB3nIHdEGWq6iMbw9iG17Z5yEgxQDI/VP9z74NLlxN2YxCY7PB+rVkZsC+KlDXq3 Wy3tD8w4LqvtgBPT5i8i5OFegELbdaYTIbPrCmRZvDzv+BCXL4t9RfAHhv9QieFjZeh8 4dPoXSCg4bAyYc2/98aiC5Hv2hy+QLHX6GjLO9XP6krBsP7dXxvEo4znuIMcDAYP7nKj qJw4SzVfZo7WBcmlBYvGWgrhC8HJAuj5D7qriICANz857uDw15M3yVJKX7yFjpBiLXdA TAyttlqWhc0MZjZe4oCshFspExpQ8MtvrV4qPt69wys3RJ59YXukhbQfOImqA2GNgbpC JXPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=iTGy6iTf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si10557491pgq.139.2019.02.02.10.39.29; Sat, 02 Feb 2019 10:39:45 -0800 (PST) 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=@joelfernandes.org header.s=google header.b=iTGy6iTf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfBBShs (ORCPT + 99 others); Sat, 2 Feb 2019 13:37:48 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42644 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbfBBShs (ORCPT ); Sat, 2 Feb 2019 13:37:48 -0500 Received: by mail-qt1-f196.google.com with SMTP id d19so11440949qtq.9 for ; Sat, 02 Feb 2019 10:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nbSyTxaBa6IIcdk8bp7fWTfN4Jl+3MC9AoZ9nbQ94gI=; b=iTGy6iTfIWKvP9SwJJCYW3i95VUl6XoQPWAZIxiPGQezVHAILhqieXt40ovOI/b3En r0oYiR+1yz4EHT3kRp2XlcNtO362ScqDpsVCY3gDcaGPa7U1jwGpeCUzWp5y2cJ6+k1M tvU8CQFNjfWFE7I+sfDMvLFkSaKCNfxgStkM4= 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=nbSyTxaBa6IIcdk8bp7fWTfN4Jl+3MC9AoZ9nbQ94gI=; b=Wt6poCCGF8a0546VOYU53/hLkcbQ6C77dXFY2yJTEFQdAURmXOcdTZCyaeFPxvu8sh lnltcOZfBtXa49LoisbZoO46Zcl8uGlFdIs1hnxcq/bjrpNp5e0jR4Q8BlzLLGgUOzvS Ptl4VQ0C+R+75aRxbIgMdqLuNViuRiCvs6lJ1DmMpp+dntR1luGox1im31MpK37xyp+Y lJZ3ZI2S9hxnPgikK8dO1B/u00HiFbxpKsNQ/jtj7ubtZHdaWQGViAujnMyP9Fptw4Oy qbStW/DFo6hPTXjJtS7f39SCxFiTK6aClJO6trq2OaZob0ROmkFHFeP5oSbihRliAlCy Kc7w== X-Gm-Message-State: AJcUuke8D/u+jTYWvOCXcrkAm/7IUHitot5SgUwaqhqmWLdbDuot3Wg4 Hhts42YgUw8kCKcIZOIdpQd87hyw5HI= X-Received: by 2002:aed:31c5:: with SMTP id 63mr43795318qth.385.1549132667225; Sat, 02 Feb 2019 10:37:47 -0800 (PST) Received: from localhost ([2620:0:1004:1100:cca9:fccc:8667:9bdc]) by smtp.gmail.com with ESMTPSA id z18sm24454734qkz.96.2019.02.02.10.37.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 10:37:45 -0800 (PST) Date: Sat, 2 Feb 2019 13:37:43 -0500 From: Joel Fernandes To: Hugo Lefeuvre Cc: Greg Kroah-Hartman , Greg Hartman , Alistair Strachan , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Christian Brauner , Ingo Molnar , Peter Zijlstra , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible Message-ID: <20190202183743.GA229953@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Fri, Feb 01, 2019 at 06:38:05AM +0100, Hugo Lefeuvre wrote: > Replace schedule(); try_to_freeze() by freezable_schedule(). > > Tasks calling freezable_schedule() set the PF_FREEZER_SKIP flag > before calling schedule(). Unlike tasks calling schedule(); > try_to_freeze() tasks calling freezable_schedule() are not awaken by > try_to_freeze_tasks(). Instead they call try_to_freeze() when they > wake up if the freeze is still underway. > > It is not a problem since sleeping tasks can't do anything which isn't > allowed for a frozen task while sleeping. > > The result is a potential performance gain during freeze, since less > tasks have to be awaken. I'm curious did you try the freezing process and see if pointless wakeups are reduced? That would be an added bonus if you did. Otherwise seems like a nice change. Peter and Rafael, what do you think? thanks, - Joel