Assaf Gordon <assafgordon@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Assaf Gordon <assafgordon@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 26311) by debbugs.gnu.org; 31 Mar 2017 03:02:27 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 30 23:02:27 2017 Received: from localhost ([127.0.0.1]:53401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ctmpW-0002jY-Pl for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 23:02:26 -0400 Received: from midir.magicbluesmoke.com ([82.195.144.46]:38316 helo=mail.magicbluesmoke.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <P@HIDDEN>) id 1ctmpV-0002jQ-7Q for 26311 <at> debbugs.gnu.org; Thu, 30 Mar 2017 23:02:25 -0400 Received: from localhost.localdomain (mobile-166-137-178-014.mycingular.net [166.137.178.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 2B1C794E1; Fri, 31 Mar 2017 04:02:20 +0100 (IST) Subject: Re: bug#26311: dd support for POSIX_FADV_NOREUSE etc. To: Paul Eggert <eggert@HIDDEN>, 26311 <at> debbugs.gnu.org References: <6a41f4ba-afcb-4565-bf56-80c7e9898dc0@HIDDEN> <7cd0342e-308c-a1af-908f-059df3b9b7b7@HIDDEN> <a7fa5e99-001e-005d-d104-b3c9c333421b@HIDDEN> From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@HIDDEN> Message-ID: <42cc996e-4c4d-b5e9-f9fb-69857a674d57@HIDDEN> Date: Thu, 30 Mar 2017 20:02:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <a7fa5e99-001e-005d-d104-b3c9c333421b@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26311 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) On 30/03/17 10:55, Paul Eggert wrote: > On 03/30/2017 09:30 AM, Pádraig Brady wrote: >> Yes maybe, though the low level meanings of these flags are >> a bit confusing and I'm not sure how consistent they are over kernel versions > > Nor I. Still, 'dd' to some extent is supposed to be a low-level program > that lets one directly access syscall flags, so following that design > philosophy we should just pass the flags through and let users > experiment with them. > >> >>> Dumb question: why does dd iflag=nocache check the return value of >>> posix_fadvise? The fadvise function ignores the return value and says >>> why; do these reasons not apply to 'dd'? >> Well for dd it's a request, which for other utils it's a performance advisement. >> As stated in the info docs, for dd it's only significant in the special case >> of dropping cache for the whole file: >> >> $ : | dd iflag=nocache count=0 status=none >> dd: failed to discard cache for: 'standard input': Illegal seek > > Yes, and that was what I was asking about. iflag=nocache is just advice > which the kernel is not obliged to follow even when the syscall succeeds > (and conversely, it's advice which the kernel might decided to follow > even when the syscall fails!). So why bother to report the syscall > failure in this particular case? > > It's no big deal. More of a philosophical question, really. Yes I'm not adamant on this behaviour, but my thinking was with count=0 iflag=nocache, you are _only_ asking for cache invalidation, so dd has more leeway to error in this case (even though the only effective error reported is EPIPE). With other dd options, you could be combining the nocaching directive with other operations and so it would be ok for the nocache advice failure to be ignored. cheers, Pádraig
bug-coreutils@HIDDEN
:bug#26311
; Package coreutils
.
Full text available.Received: (at 26311) by debbugs.gnu.org; 30 Mar 2017 17:55:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 30 13:55:29 2017 Received: from localhost ([127.0.0.1]:53154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cteIC-00016V-Tp for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 13:55:29 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1cteIB-00016H-2X for 26311 <at> debbugs.gnu.org; Thu, 30 Mar 2017 13:55:27 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 20E63160090; Thu, 30 Mar 2017 10:55:21 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6rGK2PxtTq7s; Thu, 30 Mar 2017 10:55:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5E36816009A; Thu, 30 Mar 2017 10:55:20 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id spSTSa8jOCP5; Thu, 30 Mar 2017 10:55:20 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 46517160090; Thu, 30 Mar 2017 10:55:20 -0700 (PDT) Subject: Re: bug#26311: dd support for POSIX_FADV_NOREUSE etc. To: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@HIDDEN>, 26311 <at> debbugs.gnu.org References: <6a41f4ba-afcb-4565-bf56-80c7e9898dc0@HIDDEN> <7cd0342e-308c-a1af-908f-059df3b9b7b7@HIDDEN> From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department Message-ID: <a7fa5e99-001e-005d-d104-b3c9c333421b@HIDDEN> Date: Thu, 30 Mar 2017 10:55:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7cd0342e-308c-a1af-908f-059df3b9b7b7@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26311 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) On 03/30/2017 09:30 AM, P=C3=A1draig Brady wrote: > Yes maybe, though the low level meanings of these flags are > a bit confusing and I'm not sure how consistent they are over kernel ve= rsions Nor I. Still, 'dd' to some extent is supposed to be a low-level program=20 that lets one directly access syscall flags, so following that design=20 philosophy we should just pass the flags through and let users=20 experiment with them. > >> Dumb question: why does dd iflag=3Dnocache check the return value of >> posix_fadvise? The fadvise function ignores the return value and says >> why; do these reasons not apply to 'dd'? > Well for dd it's a request, which for other utils it's a performance ad= visement. > As stated in the info docs, for dd it's only significant in the special= case > of dropping cache for the whole file: > > $ : | dd iflag=3Dnocache count=3D0 status=3Dnone > dd: failed to discard cache for: 'standard input': Illegal seek Yes, and that was what I was asking about. iflag=3Dnocache is just advice= =20 which the kernel is not obliged to follow even when the syscall succeeds=20 (and conversely, it's advice which the kernel might decided to follow=20 even when the syscall fails!). So why bother to report the syscall=20 failure in this particular case? It's no big deal. More of a philosophical question, really.
bug-coreutils@HIDDEN
:bug#26311
; Package coreutils
.
Full text available.Received: (at 26311) by debbugs.gnu.org; 30 Mar 2017 16:30:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 30 12:30:53 2017 Received: from localhost ([127.0.0.1]:53138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ctcyL-0007V8-1u for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 12:30:53 -0400 Received: from midir.magicbluesmoke.com ([82.195.144.46]:42552 helo=mail.magicbluesmoke.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <P@HIDDEN>) id 1ctcyI-0007Uv-IR for 26311 <at> debbugs.gnu.org; Thu, 30 Mar 2017 12:30:51 -0400 Received: from localhost.localdomain (mobile-166-137-178-068.mycingular.net [166.137.178.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 75A24985E; Thu, 30 Mar 2017 17:30:48 +0100 (IST) Subject: Re: bug#26311: dd support for POSIX_FADV_NOREUSE etc. To: Paul Eggert <eggert@HIDDEN>, 26311 <at> debbugs.gnu.org References: <6a41f4ba-afcb-4565-bf56-80c7e9898dc0@HIDDEN> From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@HIDDEN> Message-ID: <7cd0342e-308c-a1af-908f-059df3b9b7b7@HIDDEN> Date: Thu, 30 Mar 2017 09:30:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <6a41f4ba-afcb-4565-bf56-80c7e9898dc0@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26311 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) On 30/03/17 08:42, Paul Eggert wrote: > The 'dd' command has some complicated logic for iflag=nocache and > oflag=nocache, which I don't entirely understand but expect is in there > for good reason. I suggest that 'dd' also have simpler logic for direct > usage of posix_fadvise options. For example, 'dd iflag=noreuse' could > cause it to call fadvise (STDIN_FILENO, FADVISE_NOREUSE). I suppose > 'sequential' should be the default. Yes maybe, though the low level meanings of these flags are a bit confusing and I'm not sure how consistent they are over kernel versions, hence why a higher level "nocache" item was chosen initially. I have some notes on these settings at: https://github.com/coreutils/coreutils/blob/c7bcea1b/src/sort.c#L894-L939 > Dumb question: why does dd iflag=nocache check the return value of > posix_fadvise? The fadvise function ignores the return value and says > why; do these reasons not apply to 'dd'? Well for dd it's a request, which for other utils it's a performance advisement. As stated in the info docs, for dd it's only significant in the special case of dropping cache for the whole file: $ : | dd iflag=nocache count=0 status=none dd: failed to discard cache for: 'standard input': Illegal seek cheers, Pádraig
bug-coreutils@HIDDEN
:bug#26311
; Package coreutils
.
Full text available.Received: (at submit) by debbugs.gnu.org; 30 Mar 2017 15:43:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 30 11:43:09 2017 Received: from localhost ([127.0.0.1]:53091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ctcE8-000649-VX for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 11:43:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1ctcE7-00063x-NU for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 11:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eggert@HIDDEN>) id 1ctcE1-0003Qw-N2 for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 11:43:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:32991) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <eggert@HIDDEN>) id 1ctcE1-0003Qs-Jf for submit <at> debbugs.gnu.org; Thu, 30 Mar 2017 11:43:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <eggert@HIDDEN>) id 1ctcE0-0004DX-Gs for bug-coreutils@HIDDEN; Thu, 30 Mar 2017 11:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eggert@HIDDEN>) id 1ctcDx-0003PV-Ar for bug-coreutils@HIDDEN; Thu, 30 Mar 2017 11:43:00 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43812) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <eggert@HIDDEN>) id 1ctcDx-0003OQ-4b for bug-coreutils@HIDDEN; Thu, 30 Mar 2017 11:42:57 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0175116007A for <bug-coreutils@HIDDEN>; Thu, 30 Mar 2017 08:42:55 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Msg7doVOiQ6i for <bug-coreutils@HIDDEN>; Thu, 30 Mar 2017 08:42:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 56DAC160086 for <bug-coreutils@HIDDEN>; Thu, 30 Mar 2017 08:42:54 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uTSTQgaFobRo for <bug-coreutils@HIDDEN>; Thu, 30 Mar 2017 08:42:54 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 419C516007A for <bug-coreutils@HIDDEN>; Thu, 30 Mar 2017 08:42:54 -0700 (PDT) To: bug-coreutils@HIDDEN From: Paul Eggert <eggert@HIDDEN> Subject: dd support for POSIX_FADV_NOREUSE etc. Organization: UCLA Computer Science Department Message-ID: <6a41f4ba-afcb-4565-bf56-80c7e9898dc0@HIDDEN> Date: Thu, 30 Mar 2017 08:42:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) The 'dd' command has some complicated logic for iflag=nocache and oflag=nocache, which I don't entirely understand but expect is in there for good reason. I suggest that 'dd' also have simpler logic for direct usage of posix_fadvise options. For example, 'dd iflag=noreuse' could cause it to call fadvise (STDIN_FILENO, FADVISE_NOREUSE). I suppose 'sequential' should be the default. Dumb question: why does dd iflag=nocache check the return value of posix_fadvise? The fadvise function ignores the return value and says why; do these reasons not apply to 'dd'?
Paul Eggert <eggert@HIDDEN>
:bug-coreutils@HIDDEN
.
Full text available.bug-coreutils@HIDDEN
:bug#26311
; Package coreutils
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.