Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp146409imm; Tue, 22 May 2018 15:47:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp5tV+lakrQwNBgzzTbjw40AWl+SvodPT0Nta1M66GUxENe2f3VVBU+H+09W/6Zu6X+rxcQ X-Received: by 2002:a17:902:6687:: with SMTP id e7-v6mr377677plk.242.1527029220934; Tue, 22 May 2018 15:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527029220; cv=none; d=google.com; s=arc-20160816; b=KSiBHc9WwgWGMZibaZYx0Xi1w6vteBi7aGOVqeKv4tQW519kidiTwUgwmV/U/cIgIO D7yD6uBYGuuPb1vmFZ/2d9Za1FXYxE82PP6583qlCw4vTyAtRojen4T0LK0NwiIFK2Mi IihLcM0HbAhf7IkuTMxhTw2mhSxDRJzY9d32QjG5Izp6btqEKWOQ1n1bQyuYDKD1Zmg6 sTYoVsHJws+xBK2ABZW+StKyQwkdqVvImMiOYJGVyUD6K4HoDmW+kkGX7RYNejRG/Q9n hcKAVOT+MvJegFZR05c2TLJnylYGmOBog1wv16gta5wZVeUef3eBPsZcp+jfveF+uz0h 8ZYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=Doi/QwUSlIeg1FucixkIjmoxqOVbi/qw+aPFXYu9R+0=; b=maITUcwa/a1JT3maQREm5H/B034/Lw+fCoGrwLx+SAnpapD7OShTbM1iJol/h+rV8p 4QS+btQ82hWHAwgllWsu9JXieoAAkLEy0RjrsNjMw9TRn1T/FLdBjxFuYCCzKj4xIgpm cpOW18jWXi5X7QOR/4yub/03C8MtzE0iFdIci63TcV3eAldxeQsNjVSddys/agv3Eh5J OwgF+3bVYd6eUhGymiTjWB6rVhwdRc/7WvTknjMSC5+voPswzE5sD8CSQ4/5JPoFvYDq GUhpjTZ5qk/6Vs2Z7OwfUAuEjil9E6ZFHeBX3kRddXRMpbyW005/YRJgx4bi6b4BANjz JjPA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si13631646pgv.650.2018.05.22.15.46.46; Tue, 22 May 2018 15:47:00 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266AbeEVWow convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 May 2018 18:44:52 -0400 Received: from mga05.intel.com ([192.55.52.43]:3625 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004AbeEVWou (ORCPT ); Tue, 22 May 2018 18:44:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 15:44:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,430,1520924400"; d="scan'208";a="56718197" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2018 15:44:49 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.24]) by ORSMSX104.amr.corp.intel.com ([169.254.4.221]) with mapi id 14.03.0319.002; Tue, 22 May 2018 15:44:47 -0700 From: "Prakhya, Sai Praneeth" To: Peter Zijlstra CC: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lee Chun-Yi , Borislav Petkov , "Luck, Tony" , Will Deacon , "Hansen, Dave" , Mark Rutland , Bhupesh Sharma , Naresh Bhat , "Neri, Ricardo" , "Shankar, Ravi V" , "Matt Fleming" , "Williams, Dan J" , Ard Biesheuvel , Miguel Ojeda Subject: RE: [PATCH V3 2/3] efi: Introduce efi_queue_work() to queue any efi_runtime_service() on efi_rts_wq Thread-Topic: [PATCH V3 2/3] efi: Introduce efi_queue_work() to queue any efi_runtime_service() on efi_rts_wq Thread-Index: AQHT8XrbhGhvSb7r8EKxY2QzcAy/FKQ70YcAgAB8rzA= Date: Tue, 22 May 2018 22:44:46 +0000 Message-ID: References: <1526958784-14688-1-git-send-email-sai.praneeth.prakhya@intel.com> <1526958784-14688-3-git-send-email-sai.praneeth.prakhya@intel.com> <20180522073618.GN12198@hirez.programming.kicks-ass.net> In-Reply-To: <20180522073618.GN12198@hirez.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDFkODNjMDktMmNkZS00NGZiLWFlMzUtMGVlMTMxYzUwOGUyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZGN4amRMZVVCNDBMeUg3dUwybE1abjdwTmNxTEo5REp4ZkFsUFdCRStqRDd0Yk93NUNXV3ByamY1b0JPOUtwVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mon, May 21, 2018 at 08:13:03PM -0700, Sai Praneeth Prakhya wrote: > > + /* \ > > + * queue_work() returns 0 if work was already on queue, \ > > + * _ideally_ this should never happen. \ > > + */ \ > > + if (queue_work(efi_rts_wq, &efi_rts_work.work)) > \ > > + flush_work(&efi_rts_work.work); > \ > > Since you're _always_ going to wait for it, it is _much_ cheaper to put a > completion in your actual work and wait for that. Sure! I will change it. I also noticed that flush_work() in turn calls wait_for_completion(). Will also wait for a couple of days before posting V4. Regards, Sai