Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4354805imu; Tue, 18 Dec 2018 13:21:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/VfFDLaDaJdWTSy7ADE7ZKij98OEL6EC/8djXqA3Gg897kXCapJnJeK9zuZw8qNZOsEgF1W X-Received: by 2002:a63:ea4f:: with SMTP id l15mr16829861pgk.102.1545168083864; Tue, 18 Dec 2018 13:21:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545168083; cv=none; d=google.com; s=arc-20160816; b=vTVJ6BYcY3sZY1Lgngr4QtjdFnoWHYwRdlmP/UTOH3A7X/Z14X2zL2RQ3ffBBKhG4S DO7yOgvI/mBcyk0JA9SdZ/pt0uCzR8nZbPWIiEG1SgoE00/IpgC0YRbXthPIZJgFzPYT 0rQhcT0ix0qrHni3pb21/9H+cvEnDvVhds0ljOfWuDa7qfNQfNVeSPQfwUN+YsBqjeBF vmRpdT4/e2NnjDu8M09fjgeM/v/25LyKALHieB6/1RryY9qQZiqJatiOcwiXJgqMlH/h VX4ww+glb1Pt4UvK+/kC34Jwws9JoiioUvBg5rvtR5xcUfF1Naps0uoPqTEvXmSVhTgZ aZng== 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; bh=jBaFI9eUX2GP//beTSQ4Bfskn/pRge2jj0BHScLQywg=; b=puB9crsN17sDKp4lu5Ny4/73RlA8NMTy9Y/gi0DqF1fBvVVPtCKAqhfJ21yAJx31Pk 1nwTJ0x3BIELmul/y+pdpJoRiFzRqfhc2e7igxCKzaIDmCbe5z1JK1NqerR+mIwO5ts/ +ZD37LNG7y19NBhCiLkvXa8OnS5ejj8uRRJHHgp6QcydvuJ6Cc0JHOelvbHc/Su17MCj D2miNHtRj8bMocXLdsZB0k1rKVmGCKX3dXKSm4PkWAXi/wLZPBFYOgKU0LNMAV3cyOsp aXWmiTHkrurhqqyVHjqvcz4fTtfO6MA72M1GixM0VOXMemqBRUh2TWsmCEpGAuGNskQz vUGg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si10581343pgk.291.2018.12.18.13.21.08; Tue, 18 Dec 2018 13:21:23 -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; 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 S1727243AbeLRTkI (ORCPT + 99 others); Tue, 18 Dec 2018 14:40:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:59972 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726912AbeLRTkI (ORCPT ); Tue, 18 Dec 2018 14:40:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D426AD8B; Tue, 18 Dec 2018 19:40:06 +0000 (UTC) Date: Tue, 18 Dec 2018 11:39:57 -0800 From: Davidlohr Bueso To: Waiman Long Cc: Peter Zijlstra , Yongji Xie , mingo@redhat.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, Xie Yongji , zhangyu31@baidu.com, liuqi16@baidu.com, yuanlinsi01@baidu.com, nixun@baidu.com, lilin24@baidu.com, andrea.parri@amarulasolutions.com Subject: Re: [PATCH v2] sched/wake_q: Reduce reference counting for special users Message-ID: <20181218193957.cjx34nn5tku2eaps@linux-r8p5> References: <20181129213421.wwvhsjql3m3lvtv4@linux-r8p5> <20181129221714.GF11632@hirez.programming.kicks-ass.net> <20181217113718.GB4900@worktop.programming.kicks-ass.net> <20181217205310.pvwcryyaqlrzmaex@linux-r8p5> <20181218131031.GJ15430@hirez.programming.kicks-ass.net> <20181218131419.GD16284@hirez.programming.kicks-ass.net> <20181218185443.g5jzinm3vnrkznmm@linux-r8p5> <20181218193009.ytzz5rlrsh27rjre@linux-r8p5> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181218193009.ytzz5rlrsh27rjre@linux-r8p5> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Dec 2018, Davidlohr Bueso wrote: >+void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task) >+{ >+ if (!__wake_q_add(head, task)) >+ get_task_struct(task); *sigh* and this should be put().