From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 9 13:57:43 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 279C41E1 for ; Wed, 9 Oct 2013 13:57:43 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm14-vm3.bullet.mail.sg3.yahoo.com (nm14-vm3.bullet.mail.sg3.yahoo.com [106.10.149.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85016285C for ; Wed, 9 Oct 2013 13:57:41 +0000 (UTC) Received: from [106.10.166.61] by nm14.bullet.mail.sg3.yahoo.com with NNFMP; 09 Oct 2013 13:55:51 -0000 Received: from [106.10.150.27] by tm18.bullet.mail.sg3.yahoo.com with NNFMP; 09 Oct 2013 13:55:51 -0000 Received: from [127.0.0.1] by omp1028.mail.sg3.yahoo.com with NNFMP; 09 Oct 2013 13:55:51 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 419793.61987.bm@omp1028.mail.sg3.yahoo.com Received: (qmail 69254 invoked by uid 60001); 9 Oct 2013 13:55:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1381326951; bh=x8wrxDtKRNIY88DEHG8kAQHyLo9v49iKIhfymP2/W+I=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=e/bbR1q9WExotZlpQNJ7KFyfZ6kJUiOPqdTcpomzPe1EYizWN7/PqRRYpCPB3UKMHZvvqgyQn/lltFS1htqY3VPQ/+am+m+ikLQNLYJku6eNeSpURkWtR2ZUIo1ye94sfQUiVKtbdiipSteMFphghjywtuf+12j4xthtDraVLro= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=YAweAPA0N9wtPBtqb1v1LmvO+lJNlHWedeVvwvzjjpcyZaose92Z0HR0AdUWhmjT3pFaZO3vjreZRGESf5RGTXd0oHBR5MBdkT0aLYU+DyLI/Sn2fLRciRtGNSapW/CsTEvhOnUV+lci+hrCb4/tZ7S84q5HgrA00uDdA6QNAE8=; X-YMail-OSG: xMfh1moVM1kR.ZNn.a258YCfZvOpQ6fGpUQZ0Succrk9pym qnaTId.AExoVtz0AAL7v4zu9M0NPygG2tpZ1y0u__NsuOISJbIjXnN1xSIoD uPDKK59PdQfXeE_t17q.rs81Ob_PH1ZcVSfhXU2ylNPErlLMZeawoTZGrou4 sP_6ZrS21ZQPVFvuffpLH3N6zy9.JlSTZ_wnbdqRrRZ.iP2Y059skG5ayrYx 26_6yfy9akdx3zM94BJ_ZJR6Q5Joa4s0SSr48MIiUj8RIFg4XJJjNns0P0Na RLbD1mjOwKiNbByM68gQ3d6QB9VQ0HDqbkcsSL0BoqL7iCiuKKiKd74PLSOp l3nJypOlkhKCxuYufoA5_aGVJCWdonvHdnYwDLA0cVnYl1Zt.Es_GhfEjgZL P3NG9h4J7HLmakv9_ZVlPdnvabR3.SVEOgZt.5LGR7dRvIYQddW6tvaravMG nXh.7he0qrR.rpUiDagLJhVjGa.rmmSve5gC.VjsWqLpQ5ie3ngrLLLcyBQv n0gFD2b6odtrEJHhn.i0whCtBLeYvlHiQ5Y74eYS58f45Y2Iw_h8Mj8czWxI FjK6Oo9VwrXejzA-- Received: from [61.15.240.133] by web193502.mail.sg3.yahoo.com via HTTP; Wed, 09 Oct 2013 21:55:51 SGT X-Rocket-MIMEInfo: 002.001, SGVsbG8sIAoKCkkgd291bGQgbGlrZSB0byBrbm93IGl0IHRoZXJlIGlzIGR0cmFjZSBzdXBwb3J0IGluIHRoZSBvcGVuamRrNz8KClRoYW5rcywKUGF0cmljayBEdW5nCgoKCgpPbiBUdWVzZGF5LCBPY3RvYmVyIDgsIDIwMTMgMToyNiBQTSwgUGF0cmljayBEdW5nIDxwYXRyaWNrX2RrdEB5YWhvby5jb20uaGs.IHdyb3RlOgogCkhpIGFsbCwKCkkgd291bGQgbGlrZSB0byBrbm93IGl0IHRoZXJlIGlzIGR0cmFjZSBzdXBwb3J0IGluIHRoZSBvcGVuamRrNz8KClRoYW5rcywKUGF0cmljawpfX19fX19fX19fX18BMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <1381209858.81219.YahooMailNeo@web193501.mail.sg3.yahoo.com> Message-ID: <1381326951.68334.YahooMailNeo@web193502.mail.sg3.yahoo.com> Date: Wed, 9 Oct 2013 21:55:51 +0800 (SGT) From: Patrick Dung Subject: Re: openjdk7 dtrace support To: freebsd hackers In-Reply-To: <1381209858.81219.YahooMailNeo@web193501.mail.sg3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 13:57:43 -0000 Hello, I would like to know it there is dtrace support in the openjdk7? Thanks, Patrick Dung On Tuesday, October 8, 2013 1:26 PM, Patrick Dung wrote: Hi all, I would like to know it there is dtrace support in the openjdk7? Thanks, Patrick _______________________________________________ freebsd-java@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-java To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 9 15:14:45 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AF796F82; Wed, 9 Oct 2013 15:14:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F65B2E27; Wed, 9 Oct 2013 15:14:45 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id n9so680144qcw.33 for ; Wed, 09 Oct 2013 08:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+eNsbE1NRFViz/zO8E1B3OUoNCt2PqOv23P24xczCfM=; b=hXx2KqSOu92S+tZ6p9mYvPncMx9lS0jc7N8nHf1zKGW9VbH24U0OyaIgMTFYAe6Poc 4MLzBNB8Pg10EhpsLWTZwTHcN116HJq0CjtGdwTdMTXfkMvXZVWRZ+UDkjE/lMLXIFQ0 IZJqTnQIcRHTfTILG+o4rsmKbvd99ICb42tI/YAgx0/n+F0nY0ds4oDRNQn574J1dhAJ SL+c0qqcOvPQRjlluMv3v69h8uKEeSyajMiMBVVGv/n/w9qKpTfRc3sHFMYourXy2SDm xx8rXFzxD36/dWfDHB6lUlmQ91NAz5iqfTiyAHM7YwG5Iltd8gQaU4feROF1Hr99XxvV nUzQ== MIME-Version: 1.0 X-Received: by 10.49.59.115 with SMTP id y19mr10271335qeq.8.1381331659464; Wed, 09 Oct 2013 08:14:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Wed, 9 Oct 2013 08:14:19 -0700 (PDT) In-Reply-To: <525519F1.3050703@FreeBSD.org> References: <525519F1.3050703@FreeBSD.org> Date: Wed, 9 Oct 2013 08:14:19 -0700 X-Google-Sender-Auth: mRCdePu_EJtS8i1PFcXjjdm33Gk Message-ID: Subject: Re: taskqueue_drain_all From: Adrian Chadd To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 15:14:45 -0000 +1 Very useful :) -a On 9 October 2013 01:55, Andriy Gapon wrote: > > I would like to propose to extend taskqueue API with taskqueue_drain_all. > A potential use case: I have a private taskqueue, several kinds of tasks > get > executed via it and then I want to make sure that all of them are > completed. > Obviously, I have a way to ensure that no new ones get enqueued. > > Is this a good addition? > Or should like consider looping over all of my tasks externally to > taskqueue > implementation? > > A quick prototype: > > --- a/sys/kern/subr_taskqueue.c > +++ b/sys/kern/subr_taskqueue.c > @@ -316,6 +316,7 @@ taskqueue_run_locked(struct taskqueue *queue) > wakeup(task); > } > TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); > + wakeup(&queue->tq_active); > } > > void > @@ -402,6 +403,22 @@ taskqueue_drain(struct taskqueue *queue, struct task > *task) > } > > void > +taskqueue_drain_all(struct taskqueue *queue) > +{ > + struct task *task; > + > + TQ_LOCK(queue); > + while ((task = STAILQ_FIRST(&queue->tq_queue)) != NULL) { > + while (task->ta_pending != 0 || task_is_running(queue, > task)) > + TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, > "-", 0); > + } > + while (TAILQ_FIRST(&queue->tq_active) != NULL) > + TQ_SLEEP(queue, &queue->tq_active, > + &queue->tq_mutex, PWAIT, "-", 0); > + TQ_UNLOCK(queue); > +} > + > +void > taskqueue_drain_timeout(struct taskqueue *queue, > struct timeout_task *timeout_task) > { > > > -- > Andriy Gapon > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >