From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 343401057623 for ; Tue, 16 Jan 2018 10:08:12 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id f3so7009001wmc.1 for ; Tue, 16 Jan 2018 01:08:12 -0800 (PST) Date: Tue, 16 Jan 2018 10:08:09 +0100 From: Lars Ellenberg To: Eric Wheeler Message-ID: <20180116090809.GC4107@soda.linbit> References: <1516060335-27029-1-git-send-email-drbd-dev@lists.ewheeler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516060335-27029-1-git-send-email-drbd-dev@lists.ewheeler.net> Cc: linux-kernel@vger.kernel.org, Eric Wheeler , Philipp Reisner , Eric Wheeler , drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH] drbd: standardize kthread/workqueue thread naming to include drbd minor number List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Jan 15, 2018 at 03:52:15PM -0800, Eric Wheeler wrote: > From: Eric Wheeler > > For DRBD resources with long names that start with the same prefix, > it was difficult to find all process pids for that minor since names > are truncated to the task_struct's comm field (16 bytes). > > This patch names all processes associated with a DRBD device as drbdN_* > where N is the DRBD minor in the same ways that the drbdN_submit workqueue > is named. Userspace tools can then lookup the name=>minor=>pid mapping > and for all pids and use tools like chrt, ioprio, nice, add pids to > cgroups, or for other useful purpose. DRBD can do "multi volume" resources, which means most threads are associated not with one, but with many minors. "does not work just like that" Lars From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751225AbeAPJIP (ORCPT + 1 other); Tue, 16 Jan 2018 04:08:15 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:44968 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbeAPJIM (ORCPT ); Tue, 16 Jan 2018 04:08:12 -0500 X-Google-Smtp-Source: ACJfBotbAIqqLGHXfqBduXm7EB2YkqOzqQ54zJxAGxhP6AOK6oRni6o/jIBSRhsOvT3WWCdwCgLM1w== Date: Tue, 16 Jan 2018 10:08:09 +0100 From: Lars Ellenberg To: Eric Wheeler Cc: drbd-dev@lists.linbit.com, Eric Wheeler , Eric Wheeler , Philipp Reisner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drbd: standardize kthread/workqueue thread naming to include drbd minor number Message-ID: <20180116090809.GC4107@soda.linbit> Mail-Followup-To: Eric Wheeler , drbd-dev@lists.linbit.com, Eric Wheeler , Eric Wheeler , Philipp Reisner , linux-kernel@vger.kernel.org References: <1516060335-27029-1-git-send-email-drbd-dev@lists.ewheeler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516060335-27029-1-git-send-email-drbd-dev@lists.ewheeler.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 15, 2018 at 03:52:15PM -0800, Eric Wheeler wrote: > From: Eric Wheeler > > For DRBD resources with long names that start with the same prefix, > it was difficult to find all process pids for that minor since names > are truncated to the task_struct's comm field (16 bytes). > > This patch names all processes associated with a DRBD device as drbdN_* > where N is the DRBD minor in the same ways that the drbdN_submit workqueue > is named. Userspace tools can then lookup the name=>minor=>pid mapping > and for all pids and use tools like chrt, ioprio, nice, add pids to > cgroups, or for other useful purpose. DRBD can do "multi volume" resources, which means most threads are associated not with one, but with many minors. "does not work just like that" Lars