Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756118AbdDGJ7F (ORCPT ); Fri, 7 Apr 2017 05:59:05 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:56722 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752982AbdDGJ65 (ORCPT ); Fri, 7 Apr 2017 05:58:57 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Fri, 7 Apr 2017 10:58:38 +0100 From: Chris Wilson To: Andrea Arcangeli Cc: Martin Kepplinger , Thorsten Leemhuis , daniel.vetter@intel.com, Dave Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 5/5] i915: fence workqueue optimization Message-ID: <20170407095838.GF10496@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Andrea Arcangeli , Martin Kepplinger , Thorsten Leemhuis , daniel.vetter@intel.com, Dave Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <87pogtplxr.fsf@intel.com> <20170406232347.988-1-aarcange@redhat.com> <20170406232347.988-6-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170406232347.988-6-aarcange@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 652 Lines: 14 On Fri, Apr 07, 2017 at 01:23:47AM +0200, Andrea Arcangeli wrote: > Insist to run llist_del_all() until the free_list is found empty, this > may avoid having to schedule more workqueues. The work will already be scheduled (everytime we add the first element, the work is scheduled, and the scheduled bit is cleared before the work is executed). So we aren't saving the kworker from having to process another work, but we may make that having nothing to do. The question is whether we want to trap the kworker here, and presumably you will also want to add a cond_resched() between passes. -Chris -- Chris Wilson, Intel Open Source Technology Centre