From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHDs4-0001vC-9p for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:57:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHDs1-0002Ty-Jg for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:57:08 -0500 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:38552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHDs1-0002Tl-DF for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:57:05 -0500 Received: by mail-wm0-x229.google.com with SMTP id b14so133281522wmb.1 for ; Thu, 07 Jan 2016 08:57:05 -0800 (PST) Sender: Paolo Bonzini References: <1452020761-24457-1-git-send-email-wei.liu2@citrix.com> <1452020761-24457-10-git-send-email-wei.liu2@citrix.com> <87mvshqr4o.fsf@linux.vnet.ibm.com> From: Paolo Bonzini Message-ID: <568E98DE.1070500@redhat.com> Date: Thu, 7 Jan 2016 17:57:02 +0100 MIME-Version: 1.0 In-Reply-To: <87mvshqr4o.fsf@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" , Wei Liu , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Greg Kurz On 07/01/2016 17:41, Aneesh Kumar K.V wrote: >> > The function virtio_9p_set_fd_limit is unused. It's not, it's called at startup by libc. Paolo >> > Signed-off-by: Wei Liu >> > --- >> > hw/9pfs/virtio-9p.c | 11 --------- >> > hw/9pfs/virtio-9p.h | 68 ----------------------------------------------------- >> > 2 files changed, 79 deletions(-) >> > >> > diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c >> > index 30ff828..084fa6a 100644 >> > --- a/hw/9pfs/virtio-9p.c >> > +++ b/hw/9pfs/virtio-9p.c >> > @@ -3287,14 +3287,3 @@ void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq) >> > } >> > free_pdu(s, pdu); >> > } >> > - >> > -static void __attribute__((__constructor__)) virtio_9p_set_fd_limit(void) >> > -{ >> > - struct rlimit rlim; >> > - if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) { >> > - fprintf(stderr, "Failed to get the resource limit\n"); >> > - exit(1); >> > - } >> > - open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur/3); >> > - open_fd_rc = rlim.rlim_cur/2; >> > -} > I am looking at when we stopped using that. We still do file descriptor > reclaim. If we do that we need to set the open_fd_hw/rc. > > >