From owner-svn-src-all@FreeBSD.ORG Wed May 7 06:31:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EF999E4; Wed, 7 May 2014 06:31:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BAB3A83; Wed, 7 May 2014 06:31:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Vkn4091661; Wed, 7 May 2014 06:31:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476Vj9q091657; Wed, 7 May 2014 06:31:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070631.s476Vj9q091657@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265496 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:31:46 -0000 Author: trasz Date: Wed May 7 06:31:45 2014 New Revision: 265496 URL: http://svnweb.freebsd.org/changeset/base/265496 Log: MFC r264023: Instead of "icltx" and "iclrx", use thread names with prefix from upper layer, so that one can see which side of the stack the threads are for. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:31:45 2014 (r265496) @@ -1206,7 +1206,7 @@ cfiscsi_session_new(struct cfiscsi_softc cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif - cs->cs_conn = icl_conn_new(&cs->cs_lock); + cs->cs_conn = icl_conn_new("cfiscsi", &cs->cs_lock); cs->cs_conn->ic_receive = cfiscsi_receive_callback; cs->cs_conn->ic_error = cfiscsi_error_callback; cs->cs_conn->ic_prv0 = cs; Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:31:45 2014 (r265496) @@ -971,7 +971,7 @@ icl_pdu_queue(struct icl_pdu *ip) } struct icl_conn * -icl_conn_new(struct mtx *lock) +icl_conn_new(const char *name, struct mtx *lock) { struct icl_conn *ic; @@ -987,6 +987,7 @@ icl_conn_new(struct mtx *lock) refcount_init(&ic->ic_outstanding_pdus, 0); #endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; + ic->ic_name = name; return (ic); } @@ -1062,14 +1063,16 @@ icl_conn_start(struct icl_conn *ic) /* * Start threads. */ - error = kthread_add(icl_send_thread, ic, NULL, NULL, 0, 0, "icltx"); + error = kthread_add(icl_send_thread, ic, NULL, NULL, 0, 0, "%stx", + ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); icl_conn_close(ic); return (error); } - error = kthread_add(icl_receive_thread, ic, NULL, NULL, 0, 0, "iclrx"); + error = kthread_add(icl_receive_thread, ic, NULL, NULL, 0, 0, "%srx", + ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); icl_conn_close(ic); Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:31:45 2014 (r265496) @@ -92,6 +92,7 @@ struct icl_conn { size_t ic_max_data_segment_length; bool ic_disconnecting; bool ic_iser; + const char *ic_name; void (*ic_receive)(struct icl_pdu *); void (*ic_error)(struct icl_conn *); @@ -102,7 +103,7 @@ struct icl_conn { void *ic_prv0; }; -struct icl_conn *icl_conn_new(struct mtx *lock); +struct icl_conn *icl_conn_new(const char *name, struct mtx *lock); void icl_conn_free(struct icl_conn *ic); int icl_conn_handoff(struct icl_conn *ic, int fd); void icl_conn_shutdown(struct icl_conn *ic); Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:31:45 2014 (r265496) @@ -1633,7 +1633,7 @@ iscsi_ioctl_session_add(struct iscsi_sof return (EBUSY); } - is->is_conn = icl_conn_new(&is->is_lock); + is->is_conn = icl_conn_new("iscsi", &is->is_lock); is->is_conn->ic_receive = iscsi_receive_callback; is->is_conn->ic_error = iscsi_error_callback; is->is_conn->ic_prv0 = is;