From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423997AbcFIJBp (ORCPT ); Thu, 9 Jun 2016 05:01:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:28898 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752406AbcFIJBM (ORCPT ); Thu, 9 Jun 2016 05:01:12 -0400 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: heiko.carstens@de.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Date: Thu, 9 Jun 2016 11:00:56 +0200 From: Heiko Carstens To: Bhaktipriya Shridhar Cc: Robert Richter , Martin Schwidefsky , Tejun Heo , oprofile-list@lists.sf.net, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Hendrik Brueckner , Andreas Krebbel , Andreas Arnez , William Cohen Subject: Re: [PATCH] s390/oprofile: Remove deprecated create_workqueue References: <20160607215912.GA19722@Karyakshetra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160607215912.GA19722@Karyakshetra> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16060909-0020-0000-0000-000001BCBE66 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16060909-0021-0000-0000-00001C450B66 Message-Id: <20160609090056.GC3250@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-09_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606090096 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 08, 2016 at 03:29:12AM +0530, Bhaktipriya Shridhar wrote: > A dedicated workqueue has been used since the workqueue hws_wq with > workitem &cb->worker, is involved in hardware based sampling > on System z processors. > > Since, these are long-running work items and aren't involved in memory > reclaim in any way, system_long_wq has been used. > > Signed-off-by: Bhaktipriya Shridhar > --- > arch/s390/oprofile/hwsampler.c | 21 +++------------------ > 1 file changed, 3 insertions(+), 18 deletions(-) Besides that your patch doesn't compile... ;) Removing the flush_workqueue is probably wrong, since the oprofile module can now be unloaded while there could still be a reference to a worker structure owned by the oprofile module. However I'm wondering if we shouldn't simply remove at least the s390 specific hwswampler code from the oprofile module. This would still leave the common code timer based sampling mode for oprofile working on s390. It looks like the oprofile user space utility nowadays (since 2012) uses the kernel perf interface instead of the oprofile interface anyway, if present. So the oprofile module itself doesn't seem to have too many users left. Any opinions? > > - if (hws_wq) > - flush_workqueue(hws_wq); > - > mutex_lock(&hws_sem); > > if (hws_state == HWS_STOPPED) { > @@ -1059,10 +1048,6 @@ int hwsampler_shutdown(void) > hws_alert = 0; > deallocate_sdbt(); > } > - if (hws_wq) { > - destroy_workqueue(hws_wq); > - hws_wq = NULL; > - } > > unregister_external_irq(EXT_IRQ_MEASURE_ALERT, hws_ext_handler); > hws_state = HWS_INIT; > -- > 2.1.4 >