git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Switching from CVS to GIT

From
DKDave Korn <dave.korn@artimi.com>
Date
Oct 16, 2007, 15:47 UTC
Message-ID
<03e101c8100b$de7fa0d0$2e08a8c0@CAM.ARTIMI.COM>
In-Reply-To
<E1Ihfrl-0007w1-3I@fencepost.gnu.org>
On 16 October 2007 07:25, Eli Zaretskii wrote:
Show 6 quoted lines
> 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....


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;
 
 }


_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
http://lists.gnu.org/mailman/listinfo/make-w32
Previous: Johannes SchindelinNext: David Brown
Message 72 of 120 in “Re: Switching from CVS to GIT”
  1. Benoit SIGOUREOct 14, 2007
  2. Marco CostalbaOct 14, 2007
  3. Johannes SchindelinOct 14, 2007
  4. Martin LanghoffOct 15, 2007
  5. Andreas EricssonOct 14, 2007
  6. Johannes SchindelinOct 14, 2007
  7. Andreas EricssonOct 14, 2007
  8. Johannes SchindelinOct 14, 2007
  9. Alex RiesenOct 14, 2007
  10. Eli ZaretskiiOct 14, 2007
  11. Johannes SchindelinOct 14, 2007
  12. Brian DessentOct 15, 2007
  13. Johannes SchindelinOct 15, 2007
  14. Johannes SchindelinOct 15, 2007
  15. Eli ZaretskiiOct 15, 2007
  16. Steffen ProhaskaOct 15, 2007
  17. Eli ZaretskiiOct 15, 2007
  18. Johannes SchindelinOct 15, 2007
  19. Eli ZaretskiiOct 15, 2007
  20. Johannes SixtOct 15, 2007
  21. Eli ZaretskiiOct 15, 2007
  22. Paul SmithOct 15, 2007
  23. Steffen ProhaskaOct 15, 2007
  24. Eli ZaretskiiOct 15, 2007
  25. Eli ZaretskiiOct 15, 2007
  26. Johannes SchindelinOct 15, 2007
  27. Benoit SIGOUREOct 15, 2007
  28. Alex RiesenOct 15, 2007
  29. Brian DessentOct 15, 2007
  30. Johannes SchindelinOct 15, 2007
  31. Brian DessentOct 15, 2007
  32. Johannes SchindelinOct 15, 2007
  33. Linus TorvaldsOct 15, 2007
  34. Johannes SchindelinOct 15, 2007
  35. Alex RiesenOct 15, 2007
  36. Eli ZaretskiiOct 15, 2007
  37. Johannes SchindelinOct 15, 2007
  38. Eli ZaretskiiOct 15, 2007
  39. Brian DessentOct 15, 2007
  40. Johannes SchindelinOct 15, 2007
  41. Steffen ProhaskaOct 15, 2007
  42. Johannes SchindelinOct 15, 2007
  43. Nguyen Thai Ngoc DuyOct 16, 2007
  44. Eli ZaretskiiOct 16, 2007
  45. Nguyen Thai Ngoc DuyOct 16, 2007
  46. Eli ZaretskiiOct 16, 2007
  47. Steffen ProhaskaOct 16, 2007
  48. Eli ZaretskiiOct 15, 2007
  49. Mark WattsOct 15, 2007
  50. Eli ZaretskiiOct 15, 2007
  51. Eli ZaretskiiOct 15, 2007
  52. Johannes SchindelinOct 15, 2007
  53. David KastrupOct 15, 2007
  54. David KastrupOct 15, 2007
  55. Alex RiesenOct 15, 2007
  56. Dave KornOct 15, 2007
  57. Johannes SchindelinOct 15, 2007
  58. Alex RiesenOct 15, 2007
  59. Alex RiesenOct 15, 2007
  60. Andreas EricssonOct 14, 2007
  61. Daniel BarkalowOct 16, 2007
  62. Eli ZaretskiiOct 16, 2007
  63. Andreas EricssonOct 16, 2007
  64. Eli ZaretskiiOct 16, 2007
  65. Daniel BarkalowOct 16, 2007
  66. Johannes SchindelinOct 16, 2007
  67. Peter KarlssonOct 16, 2007
  68. Eli ZaretskiiOct 16, 2007
  69. Eli ZaretskiiOct 16, 2007
  70. David KastrupOct 16, 2007
  71. Johannes SchindelinOct 16, 2007
  72. Dave KornOct 16, 2007
  73. David BrownOct 16, 2007
  74. Nicolas PitreOct 16, 2007
  75. Dave KornOct 16, 2007
  76. Christopher FaylorOct 16, 2007
  77. Andreas EricssonOct 16, 2007
  78. Steffen ProhaskaOct 16, 2007
  79. Johannes SchindelinOct 16, 2007
  80. Steffen ProhaskaOct 16, 2007
  81. Johannes SchindelinOct 16, 2007
  82. Steffen ProhaskaOct 16, 2007
  83. Johannes SchindelinOct 16, 2007
  84. Steffen ProhaskaOct 16, 2007
  85. Eli ZaretskiiOct 16, 2007
  86. Robin RosenbergOct 17, 2007
  87. Daniel BarkalowOct 16, 2007
  88. Eli ZaretskiiOct 16, 2007
  89. Johannes SchindelinOct 16, 2007
  90. David KastrupOct 16, 2007
  91. Eli ZaretskiiOct 16, 2007
  92. Johannes SchindelinOct 16, 2007
  93. Eli ZaretskiiOct 16, 2007
  94. Johannes SchindelinOct 16, 2007
  95. Eli ZaretskiiOct 16, 2007
  96. Daniel BarkalowOct 16, 2007
  97. David KastrupOct 16, 2007
  98. Johannes SixtOct 16, 2007
  99. Eli ZaretskiiOct 16, 2007
  100. Dave KornOct 14, 2007
  101. Johannes SchindelinOct 15, 2007
  102. Alex RiesenOct 15, 2007
  103. David BrownOct 15, 2007
  104. Eli ZaretskiiOct 15, 2007
  105. Andreas EricssonOct 15, 2007
  106. Johannes SixtOct 15, 2007
  107. Andreas EricssonOct 15, 2007
  108. Dave KornOct 15, 2007
  109. Michael GebetsroitherOct 15, 2007
  110. Alex RiesenOct 15, 2007
  111. David KastrupOct 15, 2007
  112. Alex RiesenOct 15, 2007
  113. Peter KarlssonOct 16, 2007
  114. Martin LanghoffOct 15, 2007
  115. Johannes SixtOct 15, 2007
  116. Shawn O. PearceOct 15, 2007
  117. Johannes SixtOct 16, 2007
  118. Shawn O. PearceOct 16, 2007
  119. Johannes SixtOct 16, 2007
  120. Johannes SchindelinOct 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.