git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dave Korn" <dave.korn@artimi.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>, "'Andreas Ericsson'" <ae@op5.se>
Cc: git@vger.kernel.org, barkalow@iabervon.org, raa.lkml@gmail.com,
	make-w32@gnu.org, Johannes.Schindelin@gmx.de
Subject: RE: Switching from CVS to GIT
Date: Tue, 16 Oct 2007 16:47:31 +0100	[thread overview]
Message-ID: <03e101c8100b$de7fa0d0$2e08a8c0@CAM.ARTIMI.COM> (raw)
In-Reply-To: <E1Ihfrl-0007w1-3I@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On 16 October 2007 07:25, Eli Zaretskii wrote:

> On the other hand, what packages have 100K files?  If there's only one
> -- the Linux kernel -- then I think this kind of performance is for
> all practical purposes unimportant on Windows, because while it is
> reasonable to assume that someone would like to use git on Windows,
> assuming that someone will develop the Linux kernel on Windows is --
> how should I put it -- _really_ far-fetched ;-)

  Hi there!  Did someone call?

  Cross-development in general isn't what I'd call "far-fetched", and there's
no law of cross-development that says the host has to be the same platform as
the target.  :-)[*]

    cheers,
      DaveK

[*] - this smiley sponsored by the Department of the Bleedin' Obvious.
-- 
Can't think of a witty .sigline today....

[-- Attachment #2: developed-on-windows.diff --]
[-- Type: application/octet-stream, Size: 3660 bytes --]

Index: firmware_class.c
===================================================================
RCS file: /sources/repository/external_source/linux/linux-2.6.12.2/drivers/base/firmware_class.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -r1.1 -r1.2
--- firmware_class.c	17 Jan 2006 16:49:35 -0000	1.1
+++ firmware_class.c	15 Feb 2006 14:01:29 -0000	1.2
@@ -31,6 +31,7 @@ enum {
 };
 
 static int loading_timeout = 10;	/* In seconds */
+static char grow_faster = 1;      /* Boolean */
 
 /* fw_lock could be moved to 'struct firmware_priv' but since it is just
  * guarding for corner cases a global lock should be OK */
@@ -79,6 +80,28 @@ firmware_timeout_store(struct class *cla
 
 static CLASS_ATTR(timeout, 0644, firmware_timeout_show, firmware_timeout_store);
 
+static ssize_t
+firmware_grow_faster_show(struct class *class, char *buf)
+{
+	return sprintf(buf, "%d\n", grow_faster);
+}
+
+/**
+ * firmware_grow_faster_store:
+ * Description:
+ *	Sets or clears a flag that causes the reallocate routine to
+ *	grow the firmware buffer size more or less quickly.
+ *  
+ **/
+static ssize_t
+firmware_grow_faster_store(struct class *class, const char *buf, size_t count)
+{
+	grow_faster = simple_strtol(buf, NULL, 10) != 0;
+	return count;
+}
+
+static CLASS_ATTR(grow_faster, 0644, firmware_grow_faster_show, firmware_grow_faster_store);
+
 static void  fw_class_dev_release(struct class_device *class_dev);
 int firmware_class_hotplug(struct class_device *dev, char **envp,
 			   int num_envp, char *buffer, int buffer_size);
@@ -198,18 +221,27 @@ static int
 fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
 {
 	u8 *new_data;
+  int new_size;
 
 	if (min_size <= fw_priv->alloc_size)
 		return 0;
 
-	new_data = vmalloc(fw_priv->alloc_size + PAGE_SIZE);
+#define ONE_MEG (1024 * 1024)
+
+  new_size = grow_faster 
+    ? ((fw_priv->alloc_size >= ONE_MEG)
+      ? (fw_priv->alloc_size + ONE_MEG)
+      : ((fw_priv->alloc_size >= PAGE_SIZE) ? (fw_priv->alloc_size * 2) : PAGE_SIZE))
+    : (fw_priv->alloc_size + PAGE_SIZE);
+  new_data = vmalloc (new_size);
 	if (!new_data) {
-		printk(KERN_ERR "%s: unable to alloc buffer\n", __FUNCTION__);
+		printk(KERN_ERR "%s: unable to alloc buffer old size %d new size %d\n",
+      __FUNCTION__, fw_priv->alloc_size, new_size);
 		/* Make sure that we don't keep incomplete data */
 		fw_load_abort(fw_priv);
 		return -ENOMEM;
 	}
-	fw_priv->alloc_size += PAGE_SIZE;
+  fw_priv->alloc_size = new_size;
 	if (fw_priv->fw->data) {
 		memcpy(new_data, fw_priv->fw->data, fw_priv->fw->size);
 		vfree(fw_priv->fw->data);
@@ -249,6 +281,13 @@ firmware_data_write(struct kobject *kobj
 		goto out;
 
 	memcpy(fw->data + offset, buffer, count);
+  /*  A successful write should cause us to reset the timeout
+  delay, as very large firmware files might take a while to
+  send through the sysfs file.  We have the fw_lock taken at
+  the moment but the timeout function doesn't lock as it only
+  has to set a single volatile bit, so we're ok to mod it. */
+  if (timer_pending (&fw_priv->timeout))
+    mod_timer (&fw_priv->timeout, jiffies + loading_timeout * HZ);
 
 	fw->size = max_t(size_t, offset + count, fw->size);
 	retval = count;
@@ -568,6 +607,12 @@ firmware_class_init(void)
 		       __FUNCTION__);
 		class_unregister(&firmware_class);
 	}
+	error = class_create_file(&firmware_class, &class_attr_grow_faster);
+	if (error) {
+		printk(KERN_ERR "%s: class_create_file failed\n",
+		       __FUNCTION__);
+		class_unregister(&firmware_class);
+	}
 	return error;
 
 }

[-- Attachment #3: Type: text/plain, Size: 134 bytes --]

_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
http://lists.gnu.org/mailman/listinfo/make-w32

  parent reply	other threads:[~2007-10-16 15:47 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1192293466.17584.95.camel@homebase.localnet>
     [not found] ` <uy7e6keyv.fsf@gnu.org>
     [not found]   ` <1192381040.4908.57.camel@homebase.localnet>
2007-10-14 17:10     ` Switching from CVS to GIT Benoit SIGOURE
2007-10-14 18:06       ` Marco Costalba
2007-10-14 18:20       ` Johannes Schindelin
2007-10-15  5:35         ` Martin Langhoff
2007-10-14 18:27       ` Andreas Ericsson
2007-10-14 18:39         ` Johannes Schindelin
2007-10-14 19:09           ` Andreas Ericsson
2007-10-14 20:14             ` Johannes Schindelin
2007-10-14 22:14               ` Alex Riesen
2007-10-14 22:41                 ` Eli Zaretskii
2007-10-14 23:45                   ` Johannes Schindelin
2007-10-15  0:36                     ` Brian Dessent
2007-10-15  1:22                       ` Johannes Schindelin
2007-10-15  1:24                         ` Johannes Schindelin
2007-10-15  6:04                           ` Eli Zaretskii
2007-10-15  7:56                             ` Steffen Prohaska
2007-10-15  8:20                               ` Eli Zaretskii
2007-10-15  8:47                                 ` Johannes Schindelin
2007-10-15 11:09                                   ` Eli Zaretskii
2007-10-15 12:31                                     ` Johannes Sixt
2007-10-15 12:37                                       ` Eli Zaretskii
2007-10-15 18:29                                         ` Paul Smith
2007-10-15  9:23                                 ` Steffen Prohaska
2007-10-15 11:06                                   ` Eli Zaretskii
2007-10-15  4:12                         ` Eli Zaretskii
2007-10-15  8:34                           ` Johannes Schindelin
2007-10-15  9:02                             ` Benoit SIGOURE
2007-10-15 17:56                         ` Alex Riesen
2007-10-15 18:37                           ` Brian Dessent
2007-10-15 18:44                             ` Johannes Schindelin
2007-10-15 19:07                               ` Brian Dessent
2007-10-15 19:27                                 ` Johannes Schindelin
2007-10-15 20:24                                   ` Linus Torvalds
2007-10-15 20:36                                     ` Johannes Schindelin
2007-10-15 19:42                                 ` Alex Riesen
2007-10-15 19:48                                   ` Eli Zaretskii
2007-10-15 19:58                                     ` Johannes Schindelin
2007-10-15 21:06                                       ` Eli Zaretskii
2007-10-15 20:05                                   ` Brian Dessent
2007-10-15 20:19                                     ` Johannes Schindelin
2007-10-15 20:43                                       ` Steffen Prohaska
2007-10-15 20:46                                         ` Johannes Schindelin
2007-10-16  2:24                                         ` Nguyen Thai Ngoc Duy
2007-10-16  4:16                                           ` Eli Zaretskii
2007-10-16 10:09                                             ` Nguyen Thai Ngoc Duy
2007-10-16 12:18                                               ` Eli Zaretskii
2007-10-16  6:17                                           ` Steffen Prohaska
2007-10-15 21:08                                     ` Eli Zaretskii
2007-10-15 20:05                               ` Mark Watts
2007-10-15  4:06                     ` Eli Zaretskii
2007-10-15  5:56                     ` Eli Zaretskii
2007-10-15  8:44                       ` Johannes Schindelin
2007-10-15  8:56                         ` David Kastrup
2007-10-15  8:57                         ` David Kastrup
2007-10-15 17:49                         ` Alex Riesen
2007-10-15 18:25                           ` Dave Korn
2007-10-15 18:34                             ` Johannes Schindelin
2007-10-15 19:34                             ` Alex Riesen
2007-10-15 17:53                     ` Alex Riesen
2007-10-14 23:55                   ` Andreas Ericsson
2007-10-16  0:45                   ` Daniel Barkalow
2007-10-16  4:30                     ` Eli Zaretskii
2007-10-16  5:14                       ` Andreas Ericsson
2007-10-16  6:25                         ` Eli Zaretskii
2007-10-16  7:07                           ` Daniel Barkalow
2007-10-16 12:29                           ` Johannes Schindelin
2007-10-16 12:38                             ` Peter Karlsson
2007-10-16 13:04                               ` Eli Zaretskii
2007-10-16 12:53                             ` Eli Zaretskii
2007-10-16 12:59                               ` David Kastrup
2007-10-16 13:15                               ` Johannes Schindelin
2007-10-16 15:47                           ` Dave Korn [this message]
2007-10-16 15:56                           ` David Brown
2007-10-16 16:04                             ` Nicolas Pitre
2007-10-16 16:23                             ` Dave Korn
2007-10-16 18:06                               ` Christopher Faylor
2007-10-16 16:59                           ` Andreas Ericsson
2007-10-16  7:14                         ` Steffen Prohaska
2007-10-16 12:33                           ` Johannes Schindelin
2007-10-16 13:16                             ` Steffen Prohaska
2007-10-16 13:21                               ` Johannes Schindelin
2007-10-16 13:50                                 ` Steffen Prohaska
2007-10-16 14:14                                   ` Johannes Schindelin
2007-10-16 14:36                                     ` Steffen Prohaska
2007-10-16 15:12                                     ` Eli Zaretskii
2007-10-17 19:33                               ` Robin Rosenberg
2007-10-16  5:56                       ` Daniel Barkalow
2007-10-16  7:03                         ` Eli Zaretskii
2007-10-16 12:39                           ` Johannes Schindelin
2007-10-16 12:47                             ` David Kastrup
2007-10-16 13:16                             ` Eli Zaretskii
2007-10-16 13:24                               ` Johannes Schindelin
2007-10-16 15:02                                 ` Eli Zaretskii
2007-10-16 15:18                                   ` Johannes Schindelin
2007-10-16 15:43                                     ` Eli Zaretskii
2007-10-16 17:04                             ` Daniel Barkalow
2007-10-16  6:06                       ` David Kastrup
2007-10-16  6:42                       ` Johannes Sixt
2007-10-16  7:17                         ` Eli Zaretskii
2007-10-14 22:59                 ` Dave Korn
2007-10-15  0:01                   ` Johannes Schindelin
2007-10-15 17:36                     ` Alex Riesen
2007-10-15  0:03                   ` David Brown
2007-10-15  6:08                     ` Eli Zaretskii
2007-10-15 10:16                       ` Andreas Ericsson
2007-10-15 10:38                         ` Johannes Sixt
2007-10-15 10:52                           ` Andreas Ericsson
2007-10-15 11:16                           ` Dave Korn
2007-10-15  0:46                 ` Michael Gebetsroither
2007-10-15 17:38                   ` Alex Riesen
2007-10-15 19:26                     ` David Kastrup
2007-10-15 19:30                       ` Alex Riesen
2007-10-16 11:13                 ` Peter Karlsson
2007-10-15  5:43             ` Martin Langhoff
2007-10-15  6:39       ` Johannes Sixt
2007-10-15 23:12         ` Shawn O. Pearce
2007-10-16  6:10           ` Johannes Sixt
2007-10-16  6:21             ` Shawn O. Pearce
2007-10-16  6:29               ` Johannes Sixt
2007-10-16 15:16             ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='03e101c8100b$de7fa0d0$2e08a8c0@CAM.ARTIMI.COM' \
    --to=dave.korn@artimi.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ae@op5.se \
    --cc=barkalow@iabervon.org \
    --cc=eliz@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=make-w32@gnu.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).