Received: by 10.223.164.202 with SMTP id h10csp961240wrb; Tue, 7 Nov 2017 18:32:21 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qk+P7Odxbm1CMFfJMaadzSJsKvW+DhiEx1dp1QcAg7F9U1Mh4Sl3N5TrEfG8ZNNA0cWAm3 X-Received: by 10.84.168.132 with SMTP id f4mr717953plb.424.1510108341376; Tue, 07 Nov 2017 18:32:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510108341; cv=none; d=google.com; s=arc-20160816; b=E55ruzo/1dUj1/B73jdNDxs0jFqYPtayET/soda2sOLcJw5C44QWb3bmbZ2dKidgWK h8KPCcIATLNAu7cc3eOTzkXL/Z/we8suYQSV8pFChRnLKmM3rZEBuIsDceSuI9Oyx9hR AjCFZjA+AkiuoUjlVzq3t0hNqv57CuJiuECrihwmPZYS7blvigee53eaR993ph8yeTYp aeEu+Pn29HDAIaxDvbqH6gbc+YFmpuO+bDiF6n+OwOkO8hOImTzvCREXd/fVY4P7z1tS ts90Kdilpmd67fcRzmyrYJ8UKLL5iHcGtD83pv0+8yVj3fDlrbSnSCrB6fmPVXO+avB4 Prbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=XkopMxGpK84sN5598ssESL4QIV5NToT3X/VCebImgqM=; b=0bVAH1B8tz1b49F4GcDelxu1IQMOWTdu/0Yve1dtrhWZA+k2Qv7aNSwZmnkTX28kzv W6g+3b2mssOIOlfYS9pkROAmUwD2/kQztqSBCOgN2eviMVEsQcDk6orGyoaBbqqzLDXg iFck5E/QPxJW6By86dhloGoqoxEISZ+KpHKV4S5fKcqf4cfohx3TzwFy9lTqz8Wcph4S tstcipleq6GbpDli4+j+lhN2Xh2vNeuwl+q2epA9rm2oYnPsdMwb1TOSc8nhxuc7tf9M XazjBd0T54lnLpEKgpBv2hWuYez9d4Md4nKEzKDtrmvU79FslaRtsrb/re2Aj9gvID5e iiWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=S6eE8sVX; 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 n73si2642600pfb.254.2017.11.07.18.32.08; Tue, 07 Nov 2017 18:32:21 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=S6eE8sVX; 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 S1753562AbdKGTpm (ORCPT + 90 others); Tue, 7 Nov 2017 14:45:42 -0500 Received: from mail-io0-f169.google.com ([209.85.223.169]:43771 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049AbdKGTpk (ORCPT ); Tue, 7 Nov 2017 14:45:40 -0500 Received: by mail-io0-f169.google.com with SMTP id 134so3410167ioo.0 for ; Tue, 07 Nov 2017 11:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XkopMxGpK84sN5598ssESL4QIV5NToT3X/VCebImgqM=; b=S6eE8sVXNkLYlQugq5AZCN3wz3tBvIApXl59ic6O7qINws9ZVrvznfnUeMMU5+Em77 Swpuc/y6cnDrGFyMkglbh3mqfXmoga1aD50HbWXZGqxakycKaDKU03nmjvDeU+o1NMrc D7AtvDw+uiu+Wo+XH76d5Cx6ozNxTjo1WDCdJkL5W25jlt0tUHhg+EEI3n5V3Xu+j+Yr do/nzwn5BNBICQhZduuxs16SAdMnwpYTgWJKHU2XMRdBGWGSMGtgv21Zs4zS9odVXHmH n0aS/vzvZCmzgv3SqtTWYgcxPIeHSTiRMQixZX8a7kTYwcajO8t+rzZSuhXjoQhWDUjK +reg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XkopMxGpK84sN5598ssESL4QIV5NToT3X/VCebImgqM=; b=Z2bn02J3SILJSIQZ2Z6z4OXr/GEq5NI/9fOjOZZD3ovUOZUvPRWWu93Gb1IrXiNYr8 MDTeYXd2F2JGOa8z5oT4EpKYJ50uUUe2OFs4jpKsPI2Fdj78Gka9bh6B9L2usCPB2cFM zzMIy3fecomyOPY3MjVayNzzQh5Ruf2HEw3fShWjsC7Pa1KBgCAsD09/RfgiY27dhchr zTKRidTjAkv37lboZJMLG738HNKUYmzPkL+mXATzbaqVSPBe+jVB++kOvCgSYOeBX//s OuSmuWvWyDipQmXpqWR0BW8rVW09XvccLPZNlD8alLbA0f+bJLJJHWqs1aIrYJ1rca4Z W3dw== X-Gm-Message-State: AJaThX7GeNY9NSv7VXZGLZdprcGMF4E5+M3K4Z5hFcpR9DH6mJCFs9KZ /DvSBQ/MX3MWla3JwfE/WrQxCg== X-Received: by 10.107.10.98 with SMTP id u95mr25784232ioi.30.1510083940227; Tue, 07 Nov 2017 11:45:40 -0800 (PST) Received: from [192.168.1.154] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id y16sm1167321ita.11.2017.11.07.11.45.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 11:45:39 -0800 (PST) Subject: Re: [PATCH V2] kthread: zero the kthread data structure To: Shaohua Li , LKML Cc: Andrew Morton , Ingo Molnar , Tejun Heo , Dmitry Vyukov References: From: Jens Axboe Message-ID: Date: Tue, 7 Nov 2017 12:45:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07/2017 12:09 PM, Shaohua Li wrote: > kthread() could bail out early before we initialize blkcg_css (if the > kthread is killed very early. Please see xchg() statement in kthread()), > which confuses free_kthread_struct. Instead of moving the blkcg_css > initialization early, we simply zero the whole 'self' data structure, > which doesn't sound much overhead. Applied, thanks Shaohua. -- Jens Axboe From 1583463356155294722@xxx Wed Nov 08 02:32:13 +0000 2017 X-GM-THRID: 1583463356155294722 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread