Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp6008980ybg; Tue, 22 Oct 2019 11:37:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQKzKSbjOGs4KQfjgXvech9XANlTBkfS+u751M5BOGS5U6rPL4kNS7fwXltLsSqV0GolAA X-Received: by 2002:a17:907:2139:: with SMTP id qo25mr3955126ejb.207.1571769474903; Tue, 22 Oct 2019 11:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571769474; cv=none; d=google.com; s=arc-20160816; b=d1gQUkFaXwehqJfK75Yp2MaQEGGqH5owp5kD+cQjuLKEjUsLoV20FwTiCjUVpP4RlH QGiU2Bk5mAtriqqwkfVyZBDoNy6ovVorag6hNtGGF4XE2pNG8gZClsx4P7JUZCpBI11m imWjEMmLz37OOpb7s78aOq58PdVdqL8ILTdSKkq8bPekHPc5kmK5M6tW7MTbSL86blDE SloZkT9EmL3/rZksimLUn1VB/S9p62o32C8F5SPXSvjZhcPo2tP57LINcrzXVreCfPxo uGVN7KEITw6gl4d9qYaRDy8qU6CYt2wNJ+5x3F+euVStIlC0RyCey9Evqih3wktPGJz3 /e+A== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=dPjuP+VmWSvLVAg6NKGM3Tn3kuQc1C/B6A+vpJASWdY=; b=cn24F2EejpbRjPRmlWpq6Q0lMjYZTVYk/ga3gaODWXNuIEtO4mxtQ3fuHTIk+fBZH6 8xGroReQN3ebgCsQcXBmwi6yH4FoomfRzGMPwBeYljQMV6U+AW7ELGNzjD7ygZGTtUSs FOLQdEpPIqUzmw3CKTm10RVRpW5xy7QqJPR0H/UuH3AiXmG55sa9lXi1AaAFVEbvB4A0 vGpq2NNPzxA2CiMWkxqT11tN+axFN4qqSFTjsBs3RT5w3zXxtphNAA27W1OhLuE3U7vp 4AlXFUx/oJTAsPFHBIcaJWXQI+bonZxb2LjTQSTvBXSeau8WL2eGseSkP0QQr6Ctq0qY hYFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=ZY+eGwNS; 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 p20si4004022ejj.394.2019.10.22.11.37.29; Tue, 22 Oct 2019 11:37:54 -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; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=ZY+eGwNS; 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 S1732718AbfJVSfg (ORCPT + 99 others); Tue, 22 Oct 2019 14:35:36 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33463 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731007AbfJVSfg (ORCPT ); Tue, 22 Oct 2019 14:35:36 -0400 Received: by mail-lf1-f65.google.com with SMTP id y127so13949514lfc.0 for ; Tue, 22 Oct 2019 11:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=dPjuP+VmWSvLVAg6NKGM3Tn3kuQc1C/B6A+vpJASWdY=; b=ZY+eGwNS1QBTYwz/CjaNPAO/9O6VCd5l8HjrB1XlkYYK1I9HAT/tr9qxWAVDZnIMy3 COZ1QAjvsk8hTeflE3BH/PlnIhFWEn/Rm6UySdg7QOhbGZcI6UtNAlydLnRE3SYphZ3V e7xZE7D9WZgmpmyfNmfVyDDcGPQIgkJNcrz4W5d2Kx4N4p2uO/u+QZoOjCPM2KDwx/cH YsaH3ADlMAlnRjTgo/J11f8iei1l162PDU+pCBuUNceTD6X+xwUs0ggc/pNjRES05xYX GVeOFockjWvAoMSD6NiUKuqkK0JhQCf7YwXZK1sjvGhmiUnrHtx0Ts064NF8RtXeXOGH 2nHw== 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:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=dPjuP+VmWSvLVAg6NKGM3Tn3kuQc1C/B6A+vpJASWdY=; b=Vis4a1Y2N2a+jzuBNHWU0XtMNwYsNMNhq0vCQ7twRcj89n05ZR5jQoI9uUEMiqPrWu 0KBkXIUs1LtFSxWyzX2BUCz/Wn+Y5qiKx24tGgNl8shgeUVKLZtccPQqmhhYcOeanpBD Apk+oVp0RfrOCM0YWfmYlQWSzo2IXlwJCi7PtlmO4yJEELCANyb2bCoJngnm0rN1+o9q Bd3YGv39N2O+eZYQx0aXuOH471y4LyYL0g76swIxfXKnKt0VMe8y2//j3/eNN+ELzS9A bGeqm8zfv1fxp1Am6v48fAIPunnUMaBucaEertIVfjSQSQA27wVfr07ufMQMA+n/2CmC 53bA== X-Gm-Message-State: APjAAAVYMJI25+/Yhga9M0Gw90r/TcSG80r5XfVaKBoPtOYKR2LTnbT1 qsPbZr6AyS4oaWBSTv7YO5QFtw== X-Received: by 2002:a19:7516:: with SMTP id y22mr19388885lfe.57.1571769333823; Tue, 22 Oct 2019 11:35:33 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id t8sm15056191ljd.18.2019.10.22.11.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 11:35:33 -0700 (PDT) Date: Tue, 22 Oct 2019 11:35:27 -0700 From: Jakub Kicinski To: Juergen Gross Cc: xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Liu , Paul Durrant , "David S. Miller" Subject: Re: [PATCH] xen/netback: cleanup init and deinit code Message-ID: <20191022113527.6b6bf615@cakuba.netronome.com> In-Reply-To: <20191021053052.31690-1-jgross@suse.com> References: <20191021053052.31690-1-jgross@suse.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Oct 2019 07:30:52 +0200, Juergen Gross wrote: > Do some cleanup of the netback init and deinit code: > > - add an omnipotent queue deinit function usable from > xenvif_disconnect_data() and the error path of xenvif_connect_data() > - only install the irq handlers after initializing all relevant items > (especially the kthreads related to the queue) > - there is no need to use get_task_struct() after creating a kthread > and using put_task_struct() again after having stopped it. > - use kthread_run() instead of kthread_create() to spare the call of > wake_up_process(). > > Signed-off-by: Juergen Gross > Reviewed-by: Paul Durrant Applied to net-next, thanks!