From patchwork Tue Jul 16 07:13:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 2827938 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B7DA8C0AB2 for ; Tue, 16 Jul 2013 07:18:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B8A320184 for ; Tue, 16 Jul 2013 07:18:09 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mail.kernel.org (Postfix) with ESMTP id 5A7CA2017F for ; Tue, 16 Jul 2013 07:18:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6G7E9Ix021626; Tue, 16 Jul 2013 03:14:09 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6G7DTAN027869 for ; Tue, 16 Jul 2013 03:13:29 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6G7DTKL012473 for ; Tue, 16 Jul 2013 03:13:29 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6G7DST0007288 for ; Tue, 16 Jul 2013 03:13:29 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DA56DA5593; Tue, 16 Jul 2013 09:13:24 +0200 (CEST) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 16 Jul 2013 09:13:17 +0200 Message-Id: <1373958801-103613-27-git-send-email-hare@suse.de> In-Reply-To: <1373958801-103613-1-git-send-email-hare@suse.de> References: <1373958801-103613-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.29 (BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 26/30] multipathd: increase stacksize for uevent listener X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP libudev has quite some heavy stack usage, so the default stack size is not enough here. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index b41fc64..8681aa2 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1580,7 +1580,7 @@ static int child (void * param) { pthread_t check_thr, uevent_thr, uxlsnr_thr, uevq_thr; - pthread_attr_t log_attr, misc_attr; + pthread_attr_t log_attr, misc_attr, uevent_attr; struct vectors * vecs; struct multipath * mpp; int i; @@ -1593,6 +1593,7 @@ child (void * param) udev = udev_new(); setup_thread_attr(&misc_attr, 64 * 1024, 1); + setup_thread_attr(&uevent_attr, 128 * 1024, 1); setup_thread_attr(&waiter_attr, 32 * 1024, 1); if (logsink) { @@ -1658,10 +1659,11 @@ child (void * param) /* * Start uevent listener early to catch events */ - if ((rc = pthread_create(&uevent_thr, &misc_attr, ueventloop, udev))) { + if ((rc = pthread_create(&uevent_thr, &uevent_attr, ueventloop, udev))) { condlog(0, "failed to create uevent thread: %d", rc); exit(1); } + pthread_attr_destroy(&uevent_attr); if ((rc = pthread_create(&uxlsnr_thr, &misc_attr, uxlsnrloop, vecs))) { condlog(0, "failed to create cli listener: %d", rc); exit(1);